ftpfxp 0.0.3 → 0.0.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.
- data/lib/ftpfxp/ftpfxp.rb +18 -4
- metadata +2 -2
data/lib/ftpfxp/ftpfxp.rb
CHANGED
@@ -34,7 +34,8 @@ module Net
|
|
34
34
|
# - #fxpwait
|
35
35
|
# - #fxpto
|
36
36
|
# - #fastlist
|
37
|
-
# - #
|
37
|
+
# - #file_exists
|
38
|
+
# - #path_exists
|
38
39
|
#
|
39
40
|
class FTPFXP < FTP
|
40
41
|
#
|
@@ -170,14 +171,27 @@ module Net
|
|
170
171
|
#
|
171
172
|
# Check if a file path exists.
|
172
173
|
#
|
173
|
-
def
|
174
|
+
def file_exists(path)
|
174
175
|
resp = fastlist(path)
|
175
|
-
|
176
|
+
status = false
|
176
177
|
resp.each do |entry|
|
177
178
|
next if '213' == entry[0,3] # Skip these useless lines.
|
178
179
|
status = true if '-rw' == entry[0,3]
|
179
180
|
end
|
180
|
-
return
|
181
|
+
return status
|
182
|
+
end
|
183
|
+
|
184
|
+
#
|
185
|
+
# Check if a path exists.
|
186
|
+
#
|
187
|
+
def path_exists(path)
|
188
|
+
resp = fastlist(path)
|
189
|
+
status = false
|
190
|
+
resp.each do |entry|
|
191
|
+
next if '213' == entry[0,3] # Skip these useless lines.
|
192
|
+
status = true
|
193
|
+
end
|
194
|
+
return status
|
181
195
|
end
|
182
196
|
end
|
183
197
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ftpfxp
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-07-
|
6
|
+
version: 0.0.4
|
7
|
+
date: 2006-07-28 00:00:00 -04:00
|
8
8
|
summary: Extension to Net::FTP providing FXP and SSL/TLS support
|
9
9
|
require_paths:
|
10
10
|
- lib
|