posix-fileutils 0.1.3 → 0.1.4
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 +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mzg1ZTI4Nzg4NWRiMDZmNDlhNjU0Mzg1Y2YzMDgzNjc3NTYxM2ZmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGY3NWNiM2M1ZmE4NjE3NGQzM2M4ZTJkZDdiNjFiMTlmNjEwMjY3ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGExZjRiOGUxMDJlNmZmMGJjYjI0OWViZGJhZjE1MmI1Y2I4NDVjOGY5NTg1
|
10
|
+
OTI3NWUyMzM4NzE2NmYxODEwZDM0ZTYyMDA4ODUwYTM2MTJhYzQyNDM0NTZi
|
11
|
+
MmVlNTA4ZmZlZjFlNzA5ZTA1OWNjYzkxZGJlN2UzZWQ1NDhhY2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTljNjQ5ZTc1NjBjODljMmUwZmYyM2Q4N2EyZGZiZDA0NGY5ZTFkOTdlNDll
|
14
|
+
ODI3M2QwMmQ3ZTY1N2FkMzBlMjFhODQwMDk5ODNmOTRlYjUzOGMwMWRhZWIw
|
15
|
+
ZTRjNWJjNTdiOTVmNDE1NGNkMmY1ZGRhYzgwOTM2N2Q2MWQxNDY=
|
@@ -192,6 +192,23 @@ module FileUtils
|
|
192
192
|
Kernel.system "touch #{opts.to_s}#{list.to_s}"
|
193
193
|
end
|
194
194
|
|
195
|
+
alias_method :_cd, :cd
|
196
|
+
|
197
|
+
def cd list, *opts
|
198
|
+
opts = opts.to_set
|
199
|
+
|
200
|
+
list, opts = parse_list_args list, *opts
|
201
|
+
opts.flags = [:v]
|
202
|
+
|
203
|
+
raise ArgumentError if list.a?
|
204
|
+
|
205
|
+
return false unless list.directory?
|
206
|
+
|
207
|
+
_cd list.to_s, opts.include? :v ? {:verbose => true} : {:verbose => false}
|
208
|
+
|
209
|
+
true
|
210
|
+
end
|
211
|
+
|
195
212
|
def pwd
|
196
213
|
Pathname.new(`pwd`.chomp)
|
197
214
|
end
|