Class: SirvRestApi::FileInfo
- Inherits:
-
Object
- Object
- SirvRestApi::FileInfo
- Defined in:
- lib/sirv_rest_api/models.rb
Overview
File information
Instance Attribute Summary collapse
-
#basename ⇒ Object
Returns the value of attribute basename.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#ctime ⇒ Object
Returns the value of attribute ctime.
-
#dirname ⇒ Object
Returns the value of attribute dirname.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#is_directory ⇒ Object
Returns the value of attribute is_directory.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
- #directory? ⇒ Boolean
-
#initialize(data = {}) ⇒ FileInfo
constructor
A new instance of FileInfo.
Constructor Details
#initialize(data = {}) ⇒ FileInfo
Returns a new instance of FileInfo.
162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/sirv_rest_api/models.rb', line 162 def initialize(data = {}) @filename = data["filename"] @dirname = data["dirname"] @basename = data["basename"] @is_directory = data["isDirectory"] @size = data["size"] @ctime = data["ctime"] @mtime = data["mtime"] @content_type = data["contentType"] = data["meta"] ? FileMeta.new(data["meta"]) : nil end |
Instance Attribute Details
#basename ⇒ Object
Returns the value of attribute basename.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def basename @basename end |
#content_type ⇒ Object
Returns the value of attribute content_type.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def content_type @content_type end |
#ctime ⇒ Object
Returns the value of attribute ctime.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def ctime @ctime end |
#dirname ⇒ Object
Returns the value of attribute dirname.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def dirname @dirname end |
#filename ⇒ Object
Returns the value of attribute filename.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def filename @filename end |
#is_directory ⇒ Object
Returns the value of attribute is_directory.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def is_directory @is_directory end |
#meta ⇒ Object
Returns the value of attribute meta.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def end |
#mtime ⇒ Object
Returns the value of attribute mtime.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def mtime @mtime end |
#size ⇒ Object
Returns the value of attribute size.
160 161 162 |
# File 'lib/sirv_rest_api/models.rb', line 160 def size @size end |
Instance Method Details
#directory? ⇒ Boolean
174 175 176 |
# File 'lib/sirv_rest_api/models.rb', line 174 def directory? @is_directory end |