Method: CloudDoor::CloudStorage#file_exist?

Defined in:
lib/cloud_door/cloud_storage.rb

#file_exist?(file_name) ⇒ Boolean

Returns:

  • (Boolean)


201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/cloud_door/cloud_storage.rb', line 201

def file_exist?(file_name)
  if file_name =~ PARENT_DIR_PAT
    return !@file_list.top?(file_name)
  end
  @parent_id = pull_parent_id
  items = pull_files
  @parent_id = nil
  return false if items.empty? || !items.is_a?(Hash)
  items.key?(file_name)
rescue => e
  handle_exception(e)
end