rxfreadwrite 0.2.0 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ce3e2d94948e994649b37b42b231ff4a153b9966b34df1a52b5a4ab384dfe15
4
- data.tar.gz: 62b36ab4f5b3a394ad8e022c5bea9cc6f6457411858c4d370c5653a14c6c6977
3
+ metadata.gz: 94f9a14707d151f06a1f227ad5d379c7f89c5420f624fac7fc535eb3e329db48
4
+ data.tar.gz: ae350d38c82672a5a8ea7079ad3ef5af520573e9e323460be43aa9303efdf26e
5
5
  SHA512:
6
- metadata.gz: a37ea0d264edf3531b18e335b693d6e452d7f7a492e97dbf94211a321a751c53ed9b1880ebc1366fceb1992934e710ba8a733f7bc444675e5c9a6f3ae15a1a01
7
- data.tar.gz: fe40d75490bdab065e8146f1de7e60a0b0b0f8c9c636f9bf22cbe80777d013e97a56dec7062a8d223bba4339a2a44d934d0e6d628917dabab7bd12a4ed6f0060
6
+ metadata.gz: 54024ecbfa16c5f1b4376d7ac607a873ca7fc30a28ba28170632ddbb0525cfed5607f70f70a0553d041d986d2cbfc13917f7c56388ff84ad8b19fe996703b8c9
7
+ data.tar.gz: d9281807a0a2fb3d6fd8723027005af9e3cd18407f810c20d6504fdbc38de406d7b6c9d8e9ef9ea74a070d5bd2f7cc622de8e12d20d8825e2fe5b1a85a79e5de
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rxfreadwrite.rb CHANGED
@@ -15,18 +15,42 @@ module RXFReadWriteModule
15
15
  def self.glob(s) RXFReadWrite.glob(s) end
16
16
  def self.mkdir(s) RXFReadWrite.mkdir(s) end
17
17
  def self.mkdir_p(s) RXFReadWrite.mkdir_p(s) end
18
+ def self.pwd() RXFReadWrite.pwd() end
18
19
 
19
20
  end
20
21
 
21
22
  def FileX.chdir(s) RXFReadWrite.chdir(s) end
23
+
24
+ def FileX.directory?(filename)
25
+
26
+ type = FileX.filetype(filename)
27
+
28
+ filex = case type
29
+ when :file
30
+ File
31
+ when :dfs
32
+ DfsFile
33
+ else
34
+ nil
35
+ end
36
+
37
+ return nil unless filex
38
+
39
+ filex.directory? filename
40
+
41
+ end
42
+
22
43
  def FileX.mkdir(s) RXFReadWrite.mkdir(s) end
23
44
  def FileX.mkdir_p(s) RXFReadWrite.mkdir_p(s) end
45
+ def FileX.pwd() RXFReadWrite.pwd() end
24
46
  def FileX.rm(s) RXFReadWrite.rm(s) end
25
47
 
26
48
  def FileX.rm_r(s, force: false)
27
49
  RXFReadWrite.rm_r(s, force: force)
28
50
  end
29
51
 
52
+ def File.rm_rf(s) RXFReadWrite.rm_rf(s) end
53
+
30
54
  def FileX.touch(s, mtime: Time.now)
31
55
  RXFReadWrite.touch(s, mtime: mtime)
32
56
  end
@@ -96,6 +120,10 @@ class RXFReadWrite < RXFReader
96
120
 
97
121
  end
98
122
 
123
+ def self.pwd()
124
+ DfsFile.pwd
125
+ end
126
+
99
127
  def self.rm(filename)
100
128
 
101
129
  case filename[/^\w+(?=:\/\/)/]
@@ -150,6 +178,10 @@ class RXFReadWrite < RXFReader
150
178
 
151
179
  end
152
180
 
181
+ def self.rm_rf(filename)
182
+ rm_r(filename, force: true)
183
+ end
184
+
153
185
  def self.touch(filename, mtime: Time.now)
154
186
 
155
187
  case filename[/^\w+(?=:\/\/)/]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxfreadwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  gnYmJHVhKvNaFwL4ryulhkA+n8o3Ve6Kzo/AGlO2+Ge6H0bqIUbS8UisqDa7IwlY
36
36
  tvleW582+lzMrpAfWdGb4VFX
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-22 00:00:00.000000000 Z
38
+ date: 2022-02-23 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rxfreader
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0.1'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 0.1.0
69
+ version: 0.1.4
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0.1'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 0.1.0
79
+ version: 0.1.4
80
80
  description:
81
81
  email: digital.robertson@gmail.com
82
82
  executables: []
metadata.gz.sig CHANGED
Binary file