Class: ReservedNames::Win32::File
- Extended by:
- Chef::ReservedNames::Win32::API::File
- Includes:
- Chef::ReservedNames::Win32::API::File
- Defined in:
- lib/chef/win32/file.rb
Constant Summary
Constants included from Chef::ReservedNames::Win32::API::File
Chef::ReservedNames::Win32::API::File::FILE_ANY_ACCESS, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_ARCHIVE, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_COMPRESSED, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_DEVICE, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_DIRECTORY, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_ENCRYPTED, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_HIDDEN, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_NORMAL, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_OFFLINE, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_READONLY, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_REPARSE_POINT, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_SPARSE_FILE, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_TEMPORARY, Chef::ReservedNames::Win32::API::File::FILE_ATTRIBUTE_VIRTUAL, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_8042_PORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_ACPI, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_BATTERY, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_BEEP, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_BIOMETRIC, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_BLUETOOTH, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_BUS_EXTENDER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_CD_ROM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_CD_ROM_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_CHANGER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_CONTROLLER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_CRYPT_PROVIDER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DATALINK, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DFS, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DFS_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DFS_VOLUME, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DISK, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DISK_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_DVD, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_FIPS, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_FULLSCREEN_VIDEO, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_INFINIBAND, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_INPORT_PORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_KEYBOARD, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_KS, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_KSEC, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MAILSLOT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MASS_STORAGE, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MIDI_IN, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MIDI_OUT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MODEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MOUSE, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MT_COMPOSITE, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MT_TRANSPORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_MULTI_UNC_PROVIDER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NAMED_PIPE, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NETWORK, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NETWORK_BROWSER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NETWORK_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NETWORK_REDIRECTOR, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_NULL, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_PARALLEL_PORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_PHYSICAL_NETCARD, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_PMI, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_PRINTER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SCANNER, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SCREEN, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SERENUM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SERIAL_MOUSE_PORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SERIAL_PORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SMARTCARD, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SMB, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_SOUND, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_STREAMS, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_TAPE, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_TAPE_FILE_SYSTEM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_TERMSRV, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_TRANSPORT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_UNKNOWN, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_VDM, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_VIDEO, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_VIRTUAL_DISK, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_VMBUS, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_WAVE_IN, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_WAVE_OUT, Chef::ReservedNames::Win32::API::File::FILE_DEVICE_WPD, Chef::ReservedNames::Win32::API::File::FILE_FLAG_BACKUP_SEMANTICS, Chef::ReservedNames::Win32::API::File::FILE_FLAG_DELETE_ON_CLOSE, Chef::ReservedNames::Win32::API::File::FILE_FLAG_FIRST_PIPE_INSTANCE, Chef::ReservedNames::Win32::API::File::FILE_FLAG_NO_BUFFERING, Chef::ReservedNames::Win32::API::File::FILE_FLAG_OPEN_NO_RECALL, Chef::ReservedNames::Win32::API::File::FILE_FLAG_OPEN_REPARSE_POINT, Chef::ReservedNames::Win32::API::File::FILE_FLAG_OVERLAPPED, Chef::ReservedNames::Win32::API::File::FILE_FLAG_POSIX_SEMANTICS, Chef::ReservedNames::Win32::API::File::FILE_FLAG_RANDOM_ACCESS, Chef::ReservedNames::Win32::API::File::FILE_FLAG_SEQUENTIAL_SCAN, Chef::ReservedNames::Win32::API::File::FILE_FLAG_WRITE_THROUGH, Chef::ReservedNames::Win32::API::File::FILE_NAME_NORMALIZED, Chef::ReservedNames::Win32::API::File::FILE_NAME_OPENED, Chef::ReservedNames::Win32::API::File::FILE_READ_ACCESS, Chef::ReservedNames::Win32::API::File::FILE_SHARE_READ, Chef::ReservedNames::Win32::API::File::FILE_SPECIAL_ACCESS, Chef::ReservedNames::Win32::API::File::FILE_WRITE_ACCESS, Chef::ReservedNames::Win32::API::File::FSCTL_GET_REPARSE_POINT, Chef::ReservedNames::Win32::API::File::INVALID_FILE_ATTRIBUTES, Chef::ReservedNames::Win32::API::File::INVALID_HANDLE_VALUE, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_CSV, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_DFS, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_DFSR, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_HSM, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_HSM2, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_MOUNT_POINT, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_SIS, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_SYMLINK, Chef::ReservedNames::Win32::API::File::IO_REPARSE_TAG_WIM, Chef::ReservedNames::Win32::API::File::MAXIMUM_REPARSE_DATA_BUFFER_SIZE, Chef::ReservedNames::Win32::API::File::MAX_PATH, Chef::ReservedNames::Win32::API::File::METHOD_BUFFERED, Chef::ReservedNames::Win32::API::File::METHOD_DIRECT_FROM_HARDWARE, Chef::ReservedNames::Win32::API::File::METHOD_DIRECT_TO_HARDWARE, Chef::ReservedNames::Win32::API::File::METHOD_IN_DIRECT, Chef::ReservedNames::Win32::API::File::METHOD_NEITHER, Chef::ReservedNames::Win32::API::File::METHOD_OUT_DIRECT, Chef::ReservedNames::Win32::API::File::OPEN_EXISTING, Chef::ReservedNames::Win32::API::File::SYMBOLIC_LINK_FLAG_DIRECTORY
Constants included from Chef::ReservedNames::Win32::API::System
Chef::ReservedNames::Win32::API::System::PRODUCT_BUSINESS, Chef::ReservedNames::Win32::API::System::PRODUCT_BUSINESS_N, Chef::ReservedNames::Win32::API::System::PRODUCT_CLUSTER_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_DATACENTER_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_DATACENTER_SERVER_CORE, Chef::ReservedNames::Win32::API::System::PRODUCT_DATACENTER_SERVER_CORE_V, Chef::ReservedNames::Win32::API::System::PRODUCT_DATACENTER_SERVER_V, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_E, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_N, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_SERVER_CORE, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_SERVER_CORE_V, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_SERVER_IA64, Chef::ReservedNames::Win32::API::System::PRODUCT_ENTERPRISE_SERVER_V, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_BASIC, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_BASIC_E, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_BASIC_N, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_PREMIUM, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_PREMIUM_E, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_PREMIUM_N, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_PREMIUM_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_HOME_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_HYPERV, Chef::ReservedNames::Win32::API::System::PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT, Chef::ReservedNames::Win32::API::System::PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING, Chef::ReservedNames::Win32::API::System::PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY, Chef::ReservedNames::Win32::API::System::PRODUCT_PROFESSIONAL, Chef::ReservedNames::Win32::API::System::PRODUCT_PROFESSIONAL_E, Chef::ReservedNames::Win32::API::System::PRODUCT_PROFESSIONAL_N, Chef::ReservedNames::Win32::API::System::PRODUCT_SB_SOLUTION_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_SERVER_FOR_SMALLBUSINESS, Chef::ReservedNames::Win32::API::System::PRODUCT_SERVER_FOR_SMALLBUSINESS_V, Chef::ReservedNames::Win32::API::System::PRODUCT_SERVER_FOUNDATION, Chef::ReservedNames::Win32::API::System::PRODUCT_SMALLBUSINESS_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_SOLUTION_EMBEDDEDSERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_STANDARD_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_STANDARD_SERVER_CORE, Chef::ReservedNames::Win32::API::System::PRODUCT_STANDARD_SERVER_CORE_V, Chef::ReservedNames::Win32::API::System::PRODUCT_STANDARD_SERVER_V, Chef::ReservedNames::Win32::API::System::PRODUCT_STARTER, Chef::ReservedNames::Win32::API::System::PRODUCT_STARTER_E, Chef::ReservedNames::Win32::API::System::PRODUCT_STARTER_N, Chef::ReservedNames::Win32::API::System::PRODUCT_STORAGE_ENTERPRISE_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_STORAGE_EXPRESS_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_STORAGE_STANDARD_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_STORAGE_WORKGROUP_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_ULTIMATE, Chef::ReservedNames::Win32::API::System::PRODUCT_ULTIMATE_E, Chef::ReservedNames::Win32::API::System::PRODUCT_ULTIMATE_N, Chef::ReservedNames::Win32::API::System::PRODUCT_UNDEFINED, Chef::ReservedNames::Win32::API::System::PRODUCT_WEB_SERVER, Chef::ReservedNames::Win32::API::System::PRODUCT_WEB_SERVER_CORE, Chef::ReservedNames::Win32::API::System::SM_SERVERR2, Chef::ReservedNames::Win32::API::System::VER_NT_DOMAIN_CONTROLLER, Chef::ReservedNames::Win32::API::System::VER_NT_SERVER, Chef::ReservedNames::Win32::API::System::VER_NT_WORKSTATION, Chef::ReservedNames::Win32::API::System::VER_SUITE_BACKOFFICE, Chef::ReservedNames::Win32::API::System::VER_SUITE_BLADE, Chef::ReservedNames::Win32::API::System::VER_SUITE_COMPUTE_SERVER, Chef::ReservedNames::Win32::API::System::VER_SUITE_DATACENTER, Chef::ReservedNames::Win32::API::System::VER_SUITE_EMBEDDEDNT, Chef::ReservedNames::Win32::API::System::VER_SUITE_ENTERPRISE, Chef::ReservedNames::Win32::API::System::VER_SUITE_PERSONAL, Chef::ReservedNames::Win32::API::System::VER_SUITE_SINGLEUSERTS, Chef::ReservedNames::Win32::API::System::VER_SUITE_SMALLBUSINESS, Chef::ReservedNames::Win32::API::System::VER_SUITE_SMALLBUSINESS_RESTRICTED, Chef::ReservedNames::Win32::API::System::VER_SUITE_STORAGE_SERVER, Chef::ReservedNames::Win32::API::System::VER_SUITE_TERMINAL, Chef::ReservedNames::Win32::API::System::VER_SUITE_WH_SERVER
Constants included from Chef::ReservedNames::Win32::API::Security
Chef::ReservedNames::Win32::API::Security::ACCESS_ALLOWED_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_ALLOWED_CALLBACK_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_ALLOWED_COMPOUND_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_ALLOWED_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_DENIED_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_DENIED_CALLBACK_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_DENIED_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_V2_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_V3_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_V4_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MAX_MS_V5_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MIN_MS_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_MIN_MS_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::ACCESS_SYSTEM_SECURITY, Chef::ReservedNames::Win32::API::Security::ACL_REVISION, Chef::ReservedNames::Win32::API::Security::ACL_REVISION1, Chef::ReservedNames::Win32::API::Security::ACL_REVISION2, Chef::ReservedNames::Win32::API::Security::ACL_REVISION3, Chef::ReservedNames::Win32::API::Security::ACL_REVISION4, Chef::ReservedNames::Win32::API::Security::ACL_REVISION_DS, Chef::ReservedNames::Win32::API::Security::CONTAINER_INHERIT_ACE, Chef::ReservedNames::Win32::API::Security::DACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::DELETE, Chef::ReservedNames::Win32::API::Security::FAILED_ACCESS_ACE_FLAG, Chef::ReservedNames::Win32::API::Security::FILE_ADD_FILE, Chef::ReservedNames::Win32::API::Security::FILE_ADD_SUBDIRECTORY, Chef::ReservedNames::Win32::API::Security::FILE_ALL_ACCESS, Chef::ReservedNames::Win32::API::Security::FILE_APPEND_DATA, Chef::ReservedNames::Win32::API::Security::FILE_CREATE_PIPE_INSTANCE, Chef::ReservedNames::Win32::API::Security::FILE_DELETE_CHILD, Chef::ReservedNames::Win32::API::Security::FILE_EXECUTE, Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_EXECUTE, Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_READ, Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE, Chef::ReservedNames::Win32::API::Security::FILE_LIST_DIRECTORY, Chef::ReservedNames::Win32::API::Security::FILE_READ_ATTRIBUTES, Chef::ReservedNames::Win32::API::Security::FILE_READ_DATA, Chef::ReservedNames::Win32::API::Security::FILE_READ_EA, Chef::ReservedNames::Win32::API::Security::FILE_TRAVERSE, Chef::ReservedNames::Win32::API::Security::FILE_WRITE_ATTRIBUTES, Chef::ReservedNames::Win32::API::Security::FILE_WRITE_DATA, Chef::ReservedNames::Win32::API::Security::FILE_WRITE_EA, Chef::ReservedNames::Win32::API::Security::GENERIC_ALL, Chef::ReservedNames::Win32::API::Security::GENERIC_EXECUTE, Chef::ReservedNames::Win32::API::Security::GENERIC_READ, Chef::ReservedNames::Win32::API::Security::GENERIC_WRITE, Chef::ReservedNames::Win32::API::Security::GROUP_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::INHERITED_ACE, Chef::ReservedNames::Win32::API::Security::INHERIT_ONLY_ACE, Chef::ReservedNames::Win32::API::Security::LABEL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::MAXDWORD, Chef::ReservedNames::Win32::API::Security::MAX_ACL_REVISION, Chef::ReservedNames::Win32::API::Security::MIN_ACL_REVISION, Chef::ReservedNames::Win32::API::Security::NO_PROPAGATE_INHERIT_ACE, Chef::ReservedNames::Win32::API::Security::OBJECT_INHERIT_ACE, Chef::ReservedNames::Win32::API::Security::OWNER_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::PROTECTED_DACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::PROTECTED_SACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::READ_CONTROL, Chef::ReservedNames::Win32::API::Security::SACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::SECURITY_DESCRIPTOR_MIN_LENGTH, Chef::ReservedNames::Win32::API::Security::SECURITY_DESCRIPTOR_REVISION, Chef::ReservedNames::Win32::API::Security::SECURITY_DESCRIPTOR_REVISION1, Chef::ReservedNames::Win32::API::Security::SE_DACL_AUTO_INHERITED, Chef::ReservedNames::Win32::API::Security::SE_DACL_AUTO_INHERIT_REQ, Chef::ReservedNames::Win32::API::Security::SE_DACL_DEFAULTED, Chef::ReservedNames::Win32::API::Security::SE_DACL_PRESENT, Chef::ReservedNames::Win32::API::Security::SE_DACL_PROTECTED, Chef::ReservedNames::Win32::API::Security::SE_GROUP_DEFAULTED, Chef::ReservedNames::Win32::API::Security::SE_OBJECT_TYPE, Chef::ReservedNames::Win32::API::Security::SE_OWNER_DEFAULTED, Chef::ReservedNames::Win32::API::Security::SE_PRIVILEGE_ENABLED, Chef::ReservedNames::Win32::API::Security::SE_PRIVILEGE_ENABLED_BY_DEFAULT, Chef::ReservedNames::Win32::API::Security::SE_PRIVILEGE_REMOVED, Chef::ReservedNames::Win32::API::Security::SE_PRIVILEGE_USED_FOR_ACCESS, Chef::ReservedNames::Win32::API::Security::SE_PRIVILEGE_VALID_ATTRIBUTES, Chef::ReservedNames::Win32::API::Security::SE_RM_CONTROL_VALID, Chef::ReservedNames::Win32::API::Security::SE_SACL_AUTO_INHERITED, Chef::ReservedNames::Win32::API::Security::SE_SACL_AUTO_INHERIT_REQ, Chef::ReservedNames::Win32::API::Security::SE_SACL_DEFAULTED, Chef::ReservedNames::Win32::API::Security::SE_SACL_PRESENT, Chef::ReservedNames::Win32::API::Security::SE_SACL_PROTECTED, Chef::ReservedNames::Win32::API::Security::SE_SELF_RELATIVE, Chef::ReservedNames::Win32::API::Security::SID_NAME_USE, Chef::ReservedNames::Win32::API::Security::SPECIFIC_RIGHTS_ALL, Chef::ReservedNames::Win32::API::Security::STANDARD_RIGHTS_ALL, Chef::ReservedNames::Win32::API::Security::STANDARD_RIGHTS_EXECUTE, Chef::ReservedNames::Win32::API::Security::STANDARD_RIGHTS_READ, Chef::ReservedNames::Win32::API::Security::STANDARD_RIGHTS_REQUIRED, Chef::ReservedNames::Win32::API::Security::STANDARD_RIGHTS_WRITE, Chef::ReservedNames::Win32::API::Security::SUCCESSFUL_ACCESS_ACE_FLAG, Chef::ReservedNames::Win32::API::Security::SYNCHRONIZE, Chef::ReservedNames::Win32::API::Security::SYSTEM_ALARM_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_ALARM_CALLBACK_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_ALARM_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_AUDIT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_AUDIT_CALLBACK_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_AUDIT_OBJECT_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::SYSTEM_MANDATORY_LABEL_ACE_TYPE, Chef::ReservedNames::Win32::API::Security::TOKEN_ADJUST_DEFAULT, Chef::ReservedNames::Win32::API::Security::TOKEN_ADJUST_GROUPS, Chef::ReservedNames::Win32::API::Security::TOKEN_ADJUST_PRIVILEGES, Chef::ReservedNames::Win32::API::Security::TOKEN_ADJUST_SESSIONID, Chef::ReservedNames::Win32::API::Security::TOKEN_ALL_ACCESS, Chef::ReservedNames::Win32::API::Security::TOKEN_ASSIGN_PRIMARY, Chef::ReservedNames::Win32::API::Security::TOKEN_DUPLICATE, Chef::ReservedNames::Win32::API::Security::TOKEN_IMPERSONATE, Chef::ReservedNames::Win32::API::Security::TOKEN_QUERY, Chef::ReservedNames::Win32::API::Security::TOKEN_QUERY_SOURCE, Chef::ReservedNames::Win32::API::Security::TOKEN_READ, Chef::ReservedNames::Win32::API::Security::UNPROTECTED_DACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::UNPROTECTED_SACL_SECURITY_INFORMATION, Chef::ReservedNames::Win32::API::Security::VALID_INHERIT_FLAGS, Chef::ReservedNames::Win32::API::Security::WRITE_DAC, Chef::ReservedNames::Win32::API::Security::WRITE_OWNER
Class Method Summary collapse
-
.get_long_path_name(path) ⇒ Object
Gets the long form of a path (ADMINI~1 -> Administrator).
-
.get_short_path_name(path) ⇒ Object
Gets the short form of a path (Administrator -> ADMINI~1).
- .info(file_name) ⇒ Object (also: stat)
-
.link(old_name, new_name) ⇒ Object
Creates a symbolic link called
new_name
for the file or directoryold_name
. -
.readlink(link_name) ⇒ Object
Returns the path of the of the symbolic link referred to by
file
. -
.symlink(old_name, new_name) ⇒ Object
Creates a symbolic link called
new_name
for the file or directoryold_name
. -
.symlink?(file_name) ⇒ Boolean
Return true if the named file is a symbolic link, false otherwise.
- .verify_links_supported! ⇒ Object
Methods included from Chef::ReservedNames::Win32::API::File
CTL_CODE, encode_path, file_handle, file_search_handle, path_prepender, retrieve_file_info, symlink_file_handle
Class Method Details
.get_long_path_name(path) ⇒ Object
Gets the long form of a path (ADMINI~1 -> Administrator)
131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/chef/win32/file.rb', line 131 def self.get_long_path_name(path) path = path.to_wstring size = GetLongPathNameW(path, nil, 0) if size == 0 Chef::ReservedNames::Win32::Error.raise! end result = FFI::MemoryPointer.new :char, (size+1)*2 if GetLongPathNameW(path, result, size+1) == 0 Chef::ReservedNames::Win32::Error.raise! end result.read_wstring(size) end |
.get_short_path_name(path) ⇒ Object
Gets the short form of a path (Administrator -> ADMINI~1)
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/chef/win32/file.rb', line 117 def self.get_short_path_name(path) path = path.to_wstring size = GetShortPathNameW(path, nil, 0) if size == 0 Chef::ReservedNames::Win32::Error.raise! end result = FFI::MemoryPointer.new :char, (size+1)*2 if GetShortPathNameW(path, result, size+1) == 0 Chef::ReservedNames::Win32::Error.raise! end result.read_wstring(size) end |
.info(file_name) ⇒ Object Also known as: stat
144 145 146 |
# File 'lib/chef/win32/file.rb', line 144 def self.info(file_name) Info.new(file_name) end |
.link(old_name, new_name) ⇒ Object
Creates a symbolic link called new_name
for the file or directory old_name
.
This method requires Windows Vista or later to work. Otherwise, it returns nil as per MRI.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/chef/win32/file.rb', line 36 def self.link(old_name, new_name) raise Errno::ENOENT, "(#{old_name}, #{new_name})" unless ::File.exist?(old_name) # TODO do a check for CreateHardLinkW and # raise NotImplemented exception on older Windows old_name = encode_path(old_name) new_name = encode_path(new_name) unless CreateHardLinkW(new_name, old_name, nil) Chef::ReservedNames::Win32::Error.raise! end end |
.readlink(link_name) ⇒ Object
Returns the path of the of the symbolic link referred to by file
.
Requires Windows Vista or later. On older versions of Windows it will raise a NotImplementedError, as per MRI.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/chef/win32/file.rb', line 90 def self.readlink(link_name) raise Errno::ENOENT, link_name unless ::File.exists?(link_name) symlink_file_handle(link_name) do |handle| # Go to DeviceIoControl to get the symlink information # http://msdn.microsoft.com/en-us/library/windows/desktop/aa364571(v=vs.85).aspx reparse_buffer = FFI::MemoryPointer.new(MAXIMUM_REPARSE_DATA_BUFFER_SIZE) parsed_size = FFI::Buffer.new(:long).write_long(0) if DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT, nil, 0, reparse_buffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, parsed_size, nil) == 0 Chef::ReservedNames::Win32::Error.raise! end # Ensure it's a symbolic link reparse_buffer = REPARSE_DATA_BUFFER.new(reparse_buffer) if reparse_buffer[:ReparseTag] != IO_REPARSE_TAG_SYMLINK raise Errno::EACCES, "#{link_name} is not a symlink" end # Return the link destination (strip off \??\ at the beginning, which is a local filesystem thing) link_dest = reparse_buffer.reparse_buffer.substitute_name if link_dest =~ /^\\\?\?\\/ link_dest = link_dest[4..-1] end link_dest end end |
.symlink(old_name, new_name) ⇒ Object
Creates a symbolic link called new_name
for the file or directory old_name
.
This method requires Windows Vista or later to work. Otherwise, it returns nil as per MRI.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/chef/win32/file.rb', line 53 def self.symlink(old_name, new_name) # raise Errno::ENOENT, "(#{old_name}, #{new_name})" unless ::File.exist?(old_name) # TODO do a check for CreateSymbolicLinkW and # raise NotImplemented exception on older Windows flags = ::File.directory?(old_name) ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0 old_name = encode_path(old_name) new_name = encode_path(new_name) unless CreateSymbolicLinkW(new_name, old_name, flags) Chef::ReservedNames::Win32::Error.raise! end end |
.symlink?(file_name) ⇒ Boolean
Return true if the named file is a symbolic link, false otherwise.
This method requires Windows Vista or later to work. Otherwise, it always returns false as per MRI.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/chef/win32/file.rb', line 70 def self.symlink?(file_name) is_symlink = false path = encode_path(file_name) if ::File.exists?(file_name) if ((GetFileAttributesW(path) & FILE_ATTRIBUTE_REPARSE_POINT) > 0) file_search_handle(file_name) do |handle, find_data| if find_data[:dw_reserved_0] == IO_REPARSE_TAG_SYMLINK is_symlink = true end end end end is_symlink end |
.verify_links_supported! ⇒ Object
148 149 150 151 152 153 154 155 156 |
# File 'lib/chef/win32/file.rb', line 148 def self.verify_links_supported! begin CreateSymbolicLinkW(nil) rescue Chef::Exceptions::Win32APIFunctionNotImplemented => e raise e rescue Exception # things are ok. end end |