posix-fileutils 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/posix-fileutils/fileutils.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTQyMmEwZGMwNDUxY2E0MTc2MjQyNGQ1NDU2ODY2YjBiNGE4NmJhZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmZmNjM3OTRhOTdkNTUyZWRmMmNkZDQ5YmU5MWYyODEyYjkxNjM4Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzBkMjg1MDEwOGNlYTg0NDQxNDZkM2I4NDhhNDAxYWVlOWI3YThkNDNmMjBk
|
10
|
+
NDQxYmRhYTI1ZjAwYTg2MjYyNTU0OGFhMWJhYjY1MDgzMTcxZGU0NjFjNTc2
|
11
|
+
OWM3YWUwNDRiYjJkZWY1MDM3MmZkNWRmZWRiOTc1NDYzNDc2ZDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjE5NTgzYzRlMjI1OWU1MjhmMmQyYjkxNzcwOGJiYzMxOGE4ZTBjMGQ2YmIz
|
14
|
+
ZjVkMTA1NWFjMTQwZTYxOWEzMzU5MzZhNDE1ZjlhYjFjZGMyM2UyMjk4ZjEx
|
15
|
+
NTBhZDkzM2I3ZGQ2YzViY2Y3OGQxOGMyYzBhY2Y5YmRiNDY4NWM=
|
@@ -68,6 +68,7 @@ module FileUtils
|
|
68
68
|
|
69
69
|
[src, dst, opts]
|
70
70
|
end
|
71
|
+
module_function :parse_cp_args
|
71
72
|
|
72
73
|
def cp src, dst, *opts
|
73
74
|
opts = opts.to_set
|
@@ -78,6 +79,7 @@ module FileUtils
|
|
78
79
|
|
79
80
|
Kernel.system "cp #{opts.to_s}#{src.to_s} #{dst.to_s}"
|
80
81
|
end
|
82
|
+
module_function :cp
|
81
83
|
|
82
84
|
def dsync src, dst, *opts
|
83
85
|
src, dst, opts = parse_cp_args src, dst, *opts
|
@@ -110,6 +112,7 @@ module FileUtils
|
|
110
112
|
|
111
113
|
true
|
112
114
|
end
|
115
|
+
module_function :dsync
|
113
116
|
|
114
117
|
def mv src, dst, *opts
|
115
118
|
opts = opts.to_set
|
@@ -118,6 +121,7 @@ module FileUtils
|
|
118
121
|
|
119
122
|
Kernel.system "mv #{opts.to_s}#{src.to_s} #{dst.to_s}"
|
120
123
|
end
|
124
|
+
module_function :mv
|
121
125
|
|
122
126
|
def parse_list_args list, *opts
|
123
127
|
if list.a?
|
@@ -153,6 +157,7 @@ module FileUtils
|
|
153
157
|
|
154
158
|
[list, opts]
|
155
159
|
end
|
160
|
+
module_function :parse_list_args
|
156
161
|
|
157
162
|
def rm list, *opts
|
158
163
|
opts = opts.to_set
|
@@ -164,6 +169,7 @@ module FileUtils
|
|
164
169
|
|
165
170
|
Kernel.system "rm #{opts.to_s}#{list.to_s}"
|
166
171
|
end
|
172
|
+
module_function :rm
|
167
173
|
|
168
174
|
def mkdir list, *opts
|
169
175
|
opts = opts.to_set
|
@@ -182,6 +188,7 @@ module FileUtils
|
|
182
188
|
|
183
189
|
Kernel.system "mkdir #{opts.to_s}#{list.to_s}"
|
184
190
|
end
|
191
|
+
module_function :mkdir
|
185
192
|
|
186
193
|
def touch list, *opts
|
187
194
|
opts = opts.to_set
|
@@ -191,6 +198,7 @@ module FileUtils
|
|
191
198
|
|
192
199
|
Kernel.system "touch #{opts.to_s}#{list.to_s}"
|
193
200
|
end
|
201
|
+
module_function :touch
|
194
202
|
|
195
203
|
alias_method :_cd, :cd
|
196
204
|
|
@@ -208,10 +216,12 @@ module FileUtils
|
|
208
216
|
|
209
217
|
true
|
210
218
|
end
|
219
|
+
module_function :cd
|
211
220
|
|
212
221
|
def pwd
|
213
222
|
Pathname.new(`pwd`.chomp)
|
214
223
|
end
|
224
|
+
module_function :pwd
|
215
225
|
|
216
226
|
end # class << self
|
217
227
|
end # module FileUtils
|