Class: ReservedNames::Win32::File
- Inherits:
-
Object
- Object
- ReservedNames::Win32::File
- Extended by:
- Chef::Mixin::WideString, 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_ALLOW_UNPRIVILEGED_CREATE, 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::ELEVATION_TYPE, 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::LOGON32_LOGON_BATCH, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_INTERACTIVE, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_NETWORK, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_NETWORK_CLEARTEXT, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_NEW_CREDENTIALS, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_SERVICE, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_UNLOCK, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_DEFAULT, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_WINNT35, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_WINNT40, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_WINNT50, 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::POLICY_AUDIT_LOG_ADMIN, Chef::ReservedNames::Win32::API::Security::POLICY_CREATE_ACCOUNT, Chef::ReservedNames::Win32::API::Security::POLICY_CREATE_PRIVILEGE, Chef::ReservedNames::Win32::API::Security::POLICY_CREATE_SECRET, Chef::ReservedNames::Win32::API::Security::POLICY_GET_PRIVATE_INFORMATION, Chef::ReservedNames::Win32::API::Security::POLICY_LOOKUP_NAMES, Chef::ReservedNames::Win32::API::Security::POLICY_NOTIFICATION, Chef::ReservedNames::Win32::API::Security::POLICY_SERVER_ADMIN, Chef::ReservedNames::Win32::API::Security::POLICY_SET_AUDIT_REQUIREMENTS, Chef::ReservedNames::Win32::API::Security::POLICY_SET_DEFAULT_QUOTA_LIMITS, Chef::ReservedNames::Win32::API::Security::POLICY_TRUST_ADMIN, Chef::ReservedNames::Win32::API::Security::POLICY_VIEW_AUDIT_INFORMATION, Chef::ReservedNames::Win32::API::Security::POLICY_VIEW_LOCAL_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::SECURITY_IMPERSONATION_LEVEL, 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::SUBFOLDERS_AND_FILES_ONLY, 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_INFORMATION_CLASS, 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, Chef::ReservedNames::Win32::API::Security::WRITE_DAC, Chef::ReservedNames::Win32::API::Security::WRITE_OWNER
Class Method Summary collapse
- .delete_volume_mount_point(mount_point) ⇒ Object
- .file_access_check(path, desired_access) ⇒ Object
-
.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).
- .get_volume_name_for_volume_mount_point(mount_point) ⇒ Object
- .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
. - .realpath(file_name) ⇒ Object
- .set_volume_mount_point(mount_point, name) ⇒ Object
-
.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.
- .version_info(file_name) ⇒ Object
Methods included from Chef::ReservedNames::Win32::API::File
CTL_CODE, canonical_encode_path, encode_path, file_handle, file_search_handle, path_prepender, retrieve_file_info, retrieve_file_version_info, symlink_file_handle
Methods included from Chef::Mixin::WideString
utf8_to_wide, wide_to_utf8, wstring
Class Method Details
.delete_volume_mount_point(mount_point) ⇒ Object
191 192 193 194 195 |
# File 'lib/chef/win32/file.rb', line 191 def self.delete_volume_mount_point(mount_point) unless DeleteVolumeMountPointW(wstring(mount_point)) Chef::ReservedNames::Win32::Error.raise! end end |
.file_access_check(path, desired_access) ⇒ Object
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/chef/win32/file.rb', line 169 def self.file_access_check(path, desired_access) security_descriptor = Chef::ReservedNames::Win32::Security.get_file_security(path) token_rights = Chef::ReservedNames::Win32::Security::TOKEN_IMPERSONATE | Chef::ReservedNames::Win32::Security::TOKEN_QUERY | Chef::ReservedNames::Win32::Security::TOKEN_DUPLICATE | Chef::ReservedNames::Win32::Security::STANDARD_RIGHTS_READ token = Chef::ReservedNames::Win32::Security.open_process_token( Chef::ReservedNames::Win32::Process.get_current_process, token_rights ) duplicate_token = token.duplicate_token(:SecurityImpersonation) mapping = Chef::ReservedNames::Win32::Security::GENERIC_MAPPING.new mapping[:GenericRead] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_READ mapping[:GenericWrite] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_WRITE mapping[:GenericExecute] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_EXECUTE mapping[:GenericAll] = Chef::ReservedNames::Win32::Security::FILE_ALL_ACCESS Chef::ReservedNames::Win32::Security.access_check(security_descriptor, duplicate_token, desired_access, mapping) end |
.get_long_path_name(path) ⇒ Object
Gets the long form of a path (ADMINI~1 -> Administrator)
148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/chef/win32/file.rb', line 148 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)
134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/chef/win32/file.rb', line 134 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 |
.get_volume_name_for_volume_mount_point(mount_point) ⇒ Object
203 204 205 206 207 208 209 |
# File 'lib/chef/win32/file.rb', line 203 def self.get_volume_name_for_volume_mount_point(mount_point) buffer = FFI::MemoryPointer.new(2, 128) unless GetVolumeNameForVolumeMountPointW(wstring(mount_point), buffer, buffer.size / buffer.type_size) Chef::ReservedNames::Win32::Error.raise! end buffer.read_wstring end |
.info(file_name) ⇒ Object Also known as: stat
161 162 163 |
# File 'lib/chef/win32/file.rb', line 161 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.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/chef/win32/file.rb', line 42 def self.link(old_name, new_name) raise Errno::ENOENT, "(#{old_name}, #{new_name})" unless ::File.exist?(old_name) || ::File.symlink?(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.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/chef/win32/file.rb', line 106 def self.readlink(link_name) raise Errno::ENOENT, link_name unless ::File.exist?(link_name) || ::File.symlink?(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 /^\\\?\?\\/.match?(link_dest) link_dest = link_dest[4..] end link_dest end end |
.realpath(file_name) ⇒ Object
93 94 95 96 97 98 99 |
# File 'lib/chef/win32/file.rb', line 93 def self.realpath(file_name) if symlink?(file_name) readlink(file_name) else file_name end end |
.set_volume_mount_point(mount_point, name) ⇒ Object
197 198 199 200 201 |
# File 'lib/chef/win32/file.rb', line 197 def self.set_volume_mount_point(mount_point, name) unless SetVolumeMountPointW(wstring(mount_point), wstring(name)) Chef::ReservedNames::Win32::Error.raise! 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.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/chef/win32/file.rb', line 60 def self.symlink(old_name, new_name) # raise Errno::ENOENT, "(#{old_name}, #{new_name})" unless ::File.exist?(old_name) || ::File.symlink?(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 flags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE if Chef::ReservedNames::Win32::Version.new.win_10_creators_or_higher? 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.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/chef/win32/file.rb', line 78 def self.symlink?(file_name) is_symlink = false path = encode_path(file_name) if ::File.exist?(file_name) || ::File.symlink?(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 |
.version_info(file_name) ⇒ Object
165 166 167 |
# File 'lib/chef/win32/file.rb', line 165 def self.version_info(file_name) VersionInfo.new(file_name) end |