Class: Windows::Stat::Structs::BY_HANDLE_FILE_INFORMATION
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Windows::Stat::Structs::BY_HANDLE_FILE_INFORMATION
- Includes:
- Constants
- Defined in:
- lib/win32/file/windows/structs.rb
Instance Method Summary collapse
-
#atime ⇒ Object
Return the atime as a number.
-
#ctime ⇒ Object
Return the ctime as a number.
-
#mtime ⇒ Object
Return the mtime as a number.
-
#size ⇒ Object
Return the size as a single number.
Instance Method Details
#atime ⇒ Object
Return the atime as a number
66 67 68 69 70 71 |
# File 'lib/win32/file/windows/structs.rb', line 66 def atime date = ULARGE_INTEGER.new date[:u][:LowPart] = self[:ftLastAccessTime][:dwLowDateTime] date[:u][:HighPart] = self[:ftLastAccessTime][:dwHighDateTime] date[:QuadPart] / 10000000 - 11644473600 # ns, 100-ns since Jan 1, 1601. end |
#ctime ⇒ Object
Return the ctime as a number
74 75 76 77 78 79 |
# File 'lib/win32/file/windows/structs.rb', line 74 def ctime date = ULARGE_INTEGER.new date[:u][:LowPart] = self[:ftCreationTime][:dwLowDateTime] date[:u][:HighPart] = self[:ftCreationTime][:dwHighDateTime] date[:QuadPart] / 10000000 - 11644473600 # ns, 100-ns since Jan 1, 1601. end |
#mtime ⇒ Object
Return the mtime as a number
82 83 84 85 86 87 |
# File 'lib/win32/file/windows/structs.rb', line 82 def mtime date = ULARGE_INTEGER.new date[:u][:LowPart] = self[:ftLastWriteTime][:dwLowDateTime] date[:u][:HighPart] = self[:ftLastWriteTime][:dwHighDateTime] date[:QuadPart] / 10000000 - 11644473600 # ns, 100-ns since Jan 1, 1601. end |
#size ⇒ Object
Return the size as a single number
90 91 92 |
# File 'lib/win32/file/windows/structs.rb', line 90 def size (self[:nFileSizeHigh] * (MAXDWORD + 1)) + self[:nFileSizeLow] end |