ftpfxp 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ftpfxp/ftpfxp.rb +18 -4
  2. metadata +2 -2
@@ -34,7 +34,8 @@ module Net
34
34
  # - #fxpwait
35
35
  # - #fxpto
36
36
  # - #fastlist
37
- # - #fileExists
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 fileExists(path)
174
+ def file_exists(path)
174
175
  resp = fastlist(path)
175
- stats = false
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 resp
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.3
7
- date: 2006-07-23 00:00:00 -04:00
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