Class: RAPI::FileInformation
- Inherits:
-
Object
- Object
- RAPI::FileInformation
- Defined in:
- lib/rapi.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#create_time ⇒ Object
readonly
Returns the value of attribute create_time.
-
#last_access_time ⇒ Object
readonly
Returns the value of attribute last_access_time.
-
#last_write_time ⇒ Object
readonly
Returns the value of attribute last_write_time.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(ce_find_data) ⇒ FileInformation
constructor
A new instance of FileInformation.
Constructor Details
#initialize(ce_find_data) ⇒ FileInformation
Returns a new instance of FileInformation.
294 295 296 297 298 299 300 301 302 |
# File 'lib/rapi.rb', line 294 def initialize(ce_find_data) @attributes = FileAttributes.new(ce_find_data[:dwFileAttributes]) @create_time = ce_find_data[:ftCreationTime] @last_access_time = ce_find_data[:ftLastAccessTime] @last_write_time = ce_find_data[:ftLastWriteTime] @name = encode(ce_find_data[:cFileName].to_ptr.get_bytes(0, 260)) @size = ce_find_data[:nFileSizeHigh] << 32 && ce_find_data[:nFileSizeLow] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
287 288 289 |
# File 'lib/rapi.rb', line 287 def attributes @attributes end |
#create_time ⇒ Object (readonly)
Returns the value of attribute create_time.
288 289 290 |
# File 'lib/rapi.rb', line 288 def create_time @create_time end |
#last_access_time ⇒ Object (readonly)
Returns the value of attribute last_access_time.
289 290 291 |
# File 'lib/rapi.rb', line 289 def last_access_time @last_access_time end |
#last_write_time ⇒ Object (readonly)
Returns the value of attribute last_write_time.
290 291 292 |
# File 'lib/rapi.rb', line 290 def last_write_time @last_write_time end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
292 293 294 |
# File 'lib/rapi.rb', line 292 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
291 292 293 |
# File 'lib/rapi.rb', line 291 def size @size end |