drb_fileclient 0.6.1 → 0.7.1

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: e1f0a270e1365dcd6dd42f986f4527ef05f0ecd34ade395acd12355cb8078362
4
- data.tar.gz: b35293345434cc1a18e9ad92d782b8ef18e199ebe6578ea6752010783c349d9a
3
+ metadata.gz: 47e231704ab45492386eb420a6c8a1d0ea7a2c94fa01f5f20df3804a7b0d9bc1
4
+ data.tar.gz: e74b0f85ded777f20858599cdfca6c55bdf5db714896962f6078a332851a2bc0
5
5
  SHA512:
6
- metadata.gz: 6c45a27577fa8a15a8224f1b21d349bfe26c70dd79a6fd824aebd22e591a762e3a721a0eda4e9301dced3a93fb039a3b8798aa8ea7883e0ce2dcc808c2ff4501
7
- data.tar.gz: 9321992f907fcdceb1022fdb8cfd8b2783b7770cdcf0329d8f5d76da437283043bbf8e7c95e60c45d348d65657fa83a88ed52c36e821276337a60fa5c1760722
6
+ metadata.gz: 144e1153253346888208d6b63a246d1388796688a9e5428a143438d75ef9e4d46453a3e5a7e660d29cb7fec9c9b63b2eb588a9a4b1cb30c144411a734fed274b
7
+ data.tar.gz: 6f8471bb3d5fc11bf798aaca778fe1e9ff6141755b0b00441ad5b823ea069687ccd967f1b0f20d085e26cfae8d6f9897e148b9a69d539d49839b32a1ad3a45e5
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- H���ZR=����?Π���4g��RG�ۣi�=3X��H��
2
- �!ս�J�O<��G
3
- ���߁a���u�?+�� i�NN��H���H��5���`��˶�v��+��Vʰ ��n�i�������8�� д�f�5*�ǹ�)�=�y&���4�"�ft�E�f��W�;�"?ˤ�]p��b��P�s��
4
- 2=f�t\'���*W��vmO��Is\�P<n�PW�IڭNr�xo(^�"���3�|
1
+ xr�eP�w!���
2
+ �|h��ѵ_��)��Ec�t�O���go�
3
+ �@\����҃�}4f��
@@ -5,6 +5,7 @@
5
5
  require 'drb'
6
6
  require 'zip'
7
7
  require 'c32'
8
+ require 'dir-to-xml'
8
9
 
9
10
 
10
11
  class DRbFileClient
@@ -253,6 +254,69 @@ class DRbFileClient
253
254
 
254
255
  end
255
256
 
257
+ def rm_r(path, force: false)
258
+
259
+ unless @directory or path =~ /^dfs:\/\// then
260
+ return FileUtils.rm_r(path, force: force)
261
+ end
262
+
263
+ if path =~ /^dfs:\/\// then
264
+ @file, path2 = parse_path( path)
265
+ else
266
+ path2 = File.join(@directory, path)
267
+ end
268
+
269
+ @file.rm_r(path2, force: force)
270
+
271
+ end
272
+
273
+ def ru(path)
274
+
275
+ return DirToXML.new(path, verbose: false).latest unless @directory \
276
+ or path =~ /^dfs:\/\//
277
+
278
+ if path =~ /^dfs:\/\// then
279
+ @file, path2 = parse_path( path)
280
+ else
281
+ path2 = File.join(@directory, path)
282
+ end
283
+
284
+ @file.ru path2
285
+
286
+ end
287
+
288
+ def ru_r(path)
289
+
290
+ unless @directory or path =~ /^dfs:\/\// then
291
+ return DirToXML.new(path, recursive: true, verbose: false).latest
292
+ end
293
+
294
+ if path =~ /^dfs:\/\// then
295
+ @file, path2 = parse_path( path)
296
+ else
297
+ path2 = File.join(@directory, path)
298
+ end
299
+
300
+ @file.ru_r path2
301
+
302
+ end
303
+
304
+ def touch(s, mtime: Time.now)
305
+
306
+ unless @directory or s =~ /^dfs:\/\// then
307
+ return FileUtils.touch(s, mtime: mtime)
308
+ end
309
+
310
+ if s =~ /^dfs:\/\// then
311
+ @file, s2 = parse_path(s)
312
+ else
313
+ s2 = File.join(@directory, s)
314
+ end
315
+
316
+ @file.touch s2, mtime: mtime
317
+
318
+ end
319
+
256
320
  def write(filename=@filename, s)
257
321
 
258
322
  return File.write filename, s unless @directory or filename =~ /^dfs:\/\//
@@ -326,6 +390,18 @@ class DfsFile
326
390
  def self.pwd() @client.pwd() end
327
391
  def self.read(filename) @client.read(filename) end
328
392
  def self.rm(filename) @client.rm(filename) end
393
+
394
+ def self.rm_r(filename, force: false)
395
+ @client.rm_r(filename, force: force)
396
+ end
397
+
398
+ def self.ru(path) @client.ru(path) end
399
+ def self.ru_r(path) @client.ru_r(path) end
400
+
401
+ def self.touch(filename, mtime: Time.now)
402
+ @client.touch(filename, mtime: mtime)
403
+ end
404
+
329
405
  def self.write(filename, s) @client.write(filename, s) end
330
406
  def self.zip(filename, a) @client.zip(filename, a) end
331
407
 
data.tar.gz.sig CHANGED
@@ -1,4 +1 @@
1
- ��|fŔ�O��P��z`h�ARD�WR����������<�V3���ϼ�����"���!I���v�)��3J���
2
- ���=��Wx]�4���ゅZ�x�uV4��S�$��N � '�Ri���?��Q����߼��r�K��W�_��n �ē�e�).�1�����c���!�e�5�?v�k�LA��
3
- ;�����1��"�V�2$��.5v�p-�T��=�A�3����.�F
4
- o�cZs���u7��):A{����ik��MJ�ٞR��9u�XЮ?tp��*�����?C<�E��ϏQ:��4�p�=s��<y�}
1
+ r��_����ӌ�Zl�A��_NvgK'\4kw01��Qܧ�JB#�VK$�� y�ɟ6���"�̀N2��+m�,����B���tQ� ��Ǿ׻��-���i�\U�����m���mQ
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drb_fileclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  FGcgjmmz5fOIqq2sBxk6JW1yo2G43yIUzymWOYKT2Jh6RR0Gg3z66wWwYpFpx8yR
36
36
  00JTBNVAgW+s2sLpeBtyMDbb
37
37
  -----END CERTIFICATE-----
38
- date: 2022-01-18 00:00:00.000000000 Z
38
+ date: 2022-02-11 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: zip
metadata.gz.sig CHANGED
Binary file