Module | Chef::ReservedNames::Win32::API::File
In: | lib/chef/win32/api/file.rb

### Methods

CTL_CODE encode_path file_handle file_search_handle path_prepender retrieve_file_info symlink_file_handle

### Included Modules

Chef::ReservedNames::Win32::API::Security Chef::ReservedNames::Win32::API::System

### Classes and Modules

Class Chef::ReservedNames::Win32::API::File::BY_HANDLE_FILE_INFORMATION
Class Chef::ReservedNames::Win32::API::File::FILETIME
Class Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER
Class Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_GENERIC
Class Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_MOUNT_POINT
Class Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_SYMBOLIC_LINK
Class Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_UNION
Class Chef::ReservedNames::Win32::API::File::SECURITY_ATTRIBUTES
Class Chef::ReservedNames::Win32::API::File::WIN32_FIND_DATA

### Constants

FILE_ATTRIBUTE_READONLY | = | 0x00000001 |  | Win32 API Constants
FILE_ATTRIBUTE_HIDDEN | = | 0x00000002
FILE_ATTRIBUTE_SYSTEM | = | 0x00000004
FILE_ATTRIBUTE_DIRECTORY | = | 0x00000010
FILE_ATTRIBUTE_ARCHIVE | = | 0x00000020
FILE_ATTRIBUTE_DEVICE | = | 0x00000040
FILE_ATTRIBUTE_NORMAL | = | 0x00000080
FILE_ATTRIBUTE_TEMPORARY | = | 0x00000100
FILE_ATTRIBUTE_SPARSE_FILE | = | 0x00000200
FILE_ATTRIBUTE_REPARSE_POINT | = | 0x00000400
FILE_ATTRIBUTE_COMPRESSED | = | 0x00000800
FILE_ATTRIBUTE_OFFLINE | = | 0x00001000
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | = | 0x00002000
FILE_ATTRIBUTE_ENCRYPTED | = | 0x00004000
FILE_ATTRIBUTE_VIRTUAL | = | 0x00010000
INVALID_FILE_ATTRIBUTES | = | 0xFFFFFFFF
FILE_FLAG_WRITE_THROUGH | = | 0x80000000
FILE_FLAG_OVERLAPPED | = | 0x40000000
FILE_FLAG_NO_BUFFERING | = | 0x20000000
FILE_FLAG_RANDOM_ACCESS | = | 0x10000000
FILE_FLAG_SEQUENTIAL_SCAN | = | 0x08000000
FILE_FLAG_DELETE_ON_CLOSE | = | 0x04000000
FILE_FLAG_BACKUP_SEMANTICS | = | 0x02000000
FILE_FLAG_POSIX_SEMANTICS | = | 0x01000000
FILE_FLAG_OPEN_REPARSE_POINT | = | 0x00200000
FILE_FLAG_OPEN_NO_RECALL | = | 0x00100000
FILE_FLAG_FIRST_PIPE_INSTANCE | = | 0x00080000
INVALID_HANDLE_VALUE | = | 0xFFFFFFFF
MAX_PATH | = | 260
SYMBOLIC_LINK_FLAG_DIRECTORY | = | 0x1
FILE_NAME_NORMALIZED | = | 0x0
FILE_NAME_OPENED | = | 0x8
FILE_SHARE_READ | = | 0x00000001 |  | TODO add the rest of these CONSTS
OPEN_EXISTING | = | 3

FILE_DEVICE_BEEP

=

0x00000001

DeviceIoControl control codes

FILE_DEVICE_CD_ROM | = | 0x00000002
FILE_DEVICE_CD_ROM_FILE_SYSTEM | = | 0x00000003
FILE_DEVICE_CONTROLLER | = | 0x00000004
FILE_DEVICE_DATALINK | = | 0x00000005
FILE_DEVICE_DFS | = | 0x00000006
FILE_DEVICE_DISK | = | 0x00000007
FILE_DEVICE_DISK_FILE_SYSTEM | = | 0x00000008
FILE_DEVICE_FILE_SYSTEM | = | 0x00000009
FILE_DEVICE_INPORT_PORT | = | 0x0000000a
FILE_DEVICE_KEYBOARD | = | 0x0000000b
FILE_DEVICE_MAILSLOT | = | 0x0000000c
FILE_DEVICE_MIDI_IN | = | 0x0000000d
FILE_DEVICE_MIDI_OUT | = | 0x0000000e
FILE_DEVICE_MOUSE | = | 0x0000000f
FILE_DEVICE_MULTI_UNC_PROVIDER | = | 0x00000010
FILE_DEVICE_NAMED_PIPE | = | 0x00000011
FILE_DEVICE_NETWORK | = | 0x00000012
FILE_DEVICE_NETWORK_BROWSER | = | 0x00000013
FILE_DEVICE_NETWORK_FILE_SYSTEM | = | 0x00000014
FILE_DEVICE_NULL | = | 0x00000015
FILE_DEVICE_PARALLEL_PORT | = | 0x00000016
FILE_DEVICE_PHYSICAL_NETCARD | = | 0x00000017
FILE_DEVICE_PRINTER | = | 0x00000018
FILE_DEVICE_SCANNER | = | 0x00000019
FILE_DEVICE_SERIAL_MOUSE_PORT | = | 0x0000001a
FILE_DEVICE_SERIAL_PORT | = | 0x0000001b
FILE_DEVICE_SCREEN | = | 0x0000001c
FILE_DEVICE_SOUND | = | 0x0000001d
FILE_DEVICE_STREAMS | = | 0x0000001e
FILE_DEVICE_TAPE | = | 0x0000001f
FILE_DEVICE_TAPE_FILE_SYSTEM | = | 0x00000020
FILE_DEVICE_TRANSPORT | = | 0x00000021
FILE_DEVICE_UNKNOWN | = | 0x00000022
FILE_DEVICE_VIDEO | = | 0x00000023
FILE_DEVICE_VIRTUAL_DISK | = | 0x00000024
FILE_DEVICE_WAVE_IN | = | 0x00000025
FILE_DEVICE_WAVE_OUT | = | 0x00000026
FILE_DEVICE_8042_PORT | = | 0x00000027
FILE_DEVICE_NETWORK_REDIRECTOR | = | 0x00000028
FILE_DEVICE_BATTERY | = | 0x00000029
FILE_DEVICE_BUS_EXTENDER | = | 0x0000002a
FILE_DEVICE_MODEM | = | 0x0000002b
FILE_DEVICE_VDM | = | 0x0000002c
FILE_DEVICE_MASS_STORAGE | = | 0x0000002d
FILE_DEVICE_SMB | = | 0x0000002e
FILE_DEVICE_KS | = | 0x0000002f
FILE_DEVICE_CHANGER | = | 0x00000030
FILE_DEVICE_SMARTCARD | = | 0x00000031
FILE_DEVICE_ACPI | = | 0x00000032
FILE_DEVICE_DVD | = | 0x00000033
FILE_DEVICE_FULLSCREEN_VIDEO | = | 0x00000034
FILE_DEVICE_DFS_FILE_SYSTEM | = | 0x00000035
FILE_DEVICE_DFS_VOLUME | = | 0x00000036
FILE_DEVICE_SERENUM | = | 0x00000037
FILE_DEVICE_TERMSRV | = | 0x00000038
FILE_DEVICE_KSEC | = | 0x00000039
FILE_DEVICE_FIPS | = | 0x0000003A
FILE_DEVICE_INFINIBAND | = | 0x0000003B
FILE_DEVICE_VMBUS | = | 0x0000003E
FILE_DEVICE_CRYPT_PROVIDER | = | 0x0000003F
FILE_DEVICE_WPD | = | 0x00000040
FILE_DEVICE_BLUETOOTH | = | 0x00000041
FILE_DEVICE_MT_COMPOSITE | = | 0x00000042
FILE_DEVICE_MT_TRANSPORT | = | 0x00000043
FILE_DEVICE_BIOMETRIC | = | 0x00000044
FILE_DEVICE_PMI | = | 0x00000045
METHOD_BUFFERED | = | 0 |  | Methods
METHOD_IN_DIRECT | = | 1
METHOD_OUT_DIRECT | = | 2
METHOD_NEITHER | = | 3
METHOD_DIRECT_TO_HARDWARE | = | METHOD_IN_DIRECT
METHOD_DIRECT_FROM_HARDWARE | = | METHOD_OUT_DIRECT
FILE_ANY_ACCESS | = | 0 |  | Access
FILE_SPECIAL_ACCESS | = | FILE_ANY_ACCESS
FILE_READ_ACCESS | = | 0x0001
FILE_WRITE_ACCESS | = | 0x0002
FSCTL_GET_REPARSE_POINT | = | CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
IO_REPARSE_TAG_MOUNT_POINT | = | 0xA0000003 |  | Reparse point tags
IO_REPARSE_TAG_HSM | = | 0xC0000004
IO_REPARSE_TAG_HSM2 | = | 0x80000006
IO_REPARSE_TAG_SIS | = | 0x80000007
IO_REPARSE_TAG_WIM | = | 0x80000008
IO_REPARSE_TAG_CSV | = | 0x80000009
IO_REPARSE_TAG_DFS | = | 0x8000000A
IO_REPARSE_TAG_SYMLINK | = | 0xA000000C
IO_REPARSE_TAG_DFSR | = | 0x80000012
MAXIMUM_REPARSE_DATA_BUFFER_SIZE | = | 16*1024

### Public Class methods

CTL_CODE( device_type, function, method, access )

### Public Instance methods

encode_path(path)

takes the given path pre-pends "\?\" and UTF-16LE encodes it. Used to prepare paths to be passed to the *W vesion of WinAPI File functions

file_handle(path, &block)

retrieves a file handle and passes it to +&block+ along with the find_data. also ensures the handle is closed on exit of the block

file_search_handle(path, &block)

retrieves a file search handle and passes it to +&block+ along with the find_data. also ensures the handle is closed on exit of the block

path_prepender()
retrieve_file_info(file_name)
symlink_file_handle(path, &block)

[Validate]