Class: Dropbox::API::Dir
Instance Attribute Summary
Attributes inherited from Object
#client
Instance Method Summary
collapse
Methods included from Fileops
#copy, #destroy, #move, #path
Methods inherited from Object
convert, #deep_update, init, resolve_class
Instance Method Details
17
18
19
20
21
22
23
24
25
|
# File 'lib/dropbox-api/objects/dir.rb', line 17
def folder_meta(path,hash = '')
data = client.raw.metadata :path => path, :hash => hash
if data.kind_of? Dropbox::API::Error::NotModified
return Dropbox::API::Error::NotModified
else
return data
end
end
|
#ls(path_to_list = '') ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/dropbox-api/objects/dir.rb', line 8
def ls(path_to_list = '')
data = client.raw.metadata :path => path + path_to_list
if data['is_dir']
Dropbox::API::Object.convert(data.delete('contents') || [], client)
else
[Dropbox::API::Object.convert(data, client)]
end
end
|