Module: Windows::NTFS::Winternl
- Defined in:
- lib/windows/ntfs/winternl.rb
Constant Summary collapse
- FileAccessInformation =
8
- FileAlignmentInformation =
17
- FileAllInformation =
18
- FileAllocationInformation =
19
- FileAlternateNameInformation =
21
- FileAttributeTagInformation =
35
- FileBasicInformation =
4
- FileBothDirectoryInformation =
3
- FileCompletionInformation =
30
- FileCompressionInformation =
28
- FileDirectoryInformation =
1
- FileDispositionInformation =
13
- FileEaInformation =
7
- FileEndOfFileInformation =
20
- FileFullDirectoryInformation =
2
- FileFullEaInformation =
15
- FileHardLinkInformation =
46
- FileIdBothDirectoryInformation =
37
- FileIdFullDirectoryInformation =
38
- FileInternalInformation =
6
- FileLinkInformation =
11
- FileMailslotQueryInformation =
26
- FileMailslotSetInformation =
27
- FileModeInformation =
16
- FileMoveClusterInformation =
31
- FileNameInformation =
9
- FileNamesInformation =
12
- FileNetworkOpenInformation =
34
- FileObjectIdInformation =
29
- FilePipeInformation =
23
- FilePipeLocalInformation =
24
- FilePipeRemoteInformation =
25
- FilePositionInformation =
14
- FileQuotaInformation =
32
- FileRenameInformation =
10
- FileReparsePointInformation =
33
- FileShortNameInformation =
40
- FileStandardInformation =
5
- FileStreamInformation =
22
- FileTrackingInformation =
36
- FileValidDataLengthInformation =
39
- ObjectNameInformation =
1
- STATUS_SUCCESS =
0
Instance Method Summary collapse
Instance Method Details
#GetFinalPathNameByHandle(file) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/windows/ntfs/winternl.rb', line 72 def GetFinalPathNameByHandle(file) begin max_path = 256 fh = File.open(file, 'r') handle = get_osfhandle(fh.fileno) object_name_information = 0.chr * (8 + (max_path*2)) status = NtQueryObject( handle, ObjectNameInformation, object_name_information, object_name_information.size, 0 ) name = wide_to_multi(object_name_information[8..-1]) ensure fh.close end name end |