std::os::windows::fs
이 페이지의 내용
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
the Windows side of the cross-platform fs
types: the open functions' os records and
CreateFile2 itself with its constants.
Structs
OsOpenFlagsSource
pub struct OsOpenFlagsWindows knobs of Dir::open / File::open (OpenFlags.os).
What other opens of the file may do meanwhile.
FILE_FLAG_*bits ORed in:FILE_FLAG_WRITE_THROUGH,FILE_FLAG_SEQUENTIAL_SCAN,FILE_FLAG_NO_BUFFERING, ...SECURITY_*bits for opening a named pipe's client end (SECURITY_SQOS_PRESENTis added when non-zero).
OsCreateFlagsSource
pub struct OsCreateFlagsWindows knobs of the functions that may create the file
(CreateFlags.os).
As
OsOpenFlags.share_mode.As
OsOpenFlags.custom_flags.As
OsOpenFlags.security_qos_flags.FILE_ATTRIBUTE_*bits of a created file (FILE_ATTRIBUTE_HIDDEN, ...);createalso adds them to a file it empties.
CreateFileParamsSource
pub struct CreateFileParamsThe parameters of CreateFile2, as the OS has them.
GENERIC_READ,FILE_APPEND_DATA, ...; 0 opens for metadata only.CREATE_NEW..TRUNCATE_EXISTING.FILE_SHARE_*bits: what other opens may do meanwhile.FILE_ATTRIBUTE_*bits of a created file.FILE_FLAG_*bits.SECURITY_*bits (SECURITY_SQOS_PRESENTis added when non-zero).
Traits
DirExtSource
pub trait DirExtCreateFile2 as the OS has it, for what the typed functions leave
out (truncating an existing file only, metadata-only handles, ...).
CreateFile2ofpathunder this directory withparamsas given; nothing else is checked. The handle is never inherited.
Constants
FILE_SHARE_READSource
pub const FILE_SHARE_READ: u32 = 0x1u32Others may open the file for reading meanwhile.
FILE_SHARE_WRITESource
pub const FILE_SHARE_WRITE: u32 = 0x2u32Others may open the file for writing meanwhile.
FILE_SHARE_DELETESource
pub const FILE_SHARE_DELETE: u32 = 0x4u32Others may delete or rename the file meanwhile.
GENERIC_READSource
pub const GENERIC_READ: u32 = 0x80000000u32Read access.
GENERIC_WRITESource
pub const GENERIC_WRITE: u32 = 0x40000000u32Write access.
FILE_READ_DATASource
pub const FILE_READ_DATA: u32 = 0x1u32Read the file's data.
FILE_WRITE_DATASource
pub const FILE_WRITE_DATA: u32 = 0x2u32Write the file's data.
FILE_APPEND_DATASource
pub const FILE_APPEND_DATA: u32 = 0x4u32Append to the file's data.
FILE_READ_ATTRIBUTESSource
pub const FILE_READ_ATTRIBUTES: u32 = 0x80u32Read the file's attributes.
FILE_WRITE_ATTRIBUTESSource
pub const FILE_WRITE_ATTRIBUTES: u32 = 0x100u32Write the file's attributes.
DELETESource
pub const DELETE: u32 = 0x10000u32Delete the file.
SYNCHRONIZESource
pub const SYNCHRONIZE: u32 = 0x100000u32Wait on the handle.
CREATE_NEWSource
pub const CREATE_NEW: u32 = 1u32Create; fail when the file exists.
CREATE_ALWAYSSource
pub const CREATE_ALWAYS: u32 = 2u32Create, or empty the file when it exists.
OPEN_EXISTINGSource
pub const OPEN_EXISTING: u32 = 3u32Open; fail when the file is missing.
OPEN_ALWAYSSource
pub const OPEN_ALWAYS: u32 = 4u32Open, creating the file when missing.
TRUNCATE_EXISTINGSource
pub const TRUNCATE_EXISTING: u32 = 5u32Open and empty; fail when the file is missing.
FILE_ATTRIBUTE_READONLYSource
pub const FILE_ATTRIBUTE_READONLY: u32 = 0x1u32Read-only.
FILE_ATTRIBUTE_HIDDENSource
pub const FILE_ATTRIBUTE_HIDDEN: u32 = 0x2u32Hidden from ordinary listings.
FILE_ATTRIBUTE_SYSTEMSource
pub const FILE_ATTRIBUTE_SYSTEM: u32 = 0x4u32Used by the OS.
FILE_ATTRIBUTE_ARCHIVESource
pub const FILE_ATTRIBUTE_ARCHIVE: u32 = 0x20u32Marked for backup.
FILE_ATTRIBUTE_NORMALSource
pub const FILE_ATTRIBUTE_NORMAL: u32 = 0x80u32No other attribute.
FILE_ATTRIBUTE_TEMPORARYSource
pub const FILE_ATTRIBUTE_TEMPORARY: u32 = 0x100u32Temporary: kept in memory when possible.
FILE_ATTRIBUTE_OFFLINESource
pub const FILE_ATTRIBUTE_OFFLINE: u32 = 0x1000u32Its data is on offline storage.
FILE_ATTRIBUTE_NOT_CONTENT_INDEXEDSource
pub const FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: u32 = 0x2000u32Not indexed by the content indexer.
FILE_ATTRIBUTE_ENCRYPTEDSource
pub const FILE_ATTRIBUTE_ENCRYPTED: u32 = 0x4000u32Encrypted.
FILE_FLAG_WRITE_THROUGHSource
pub const FILE_FLAG_WRITE_THROUGH: u32 = 0x80000000u32Writes go through the cache to the disk.
FILE_FLAG_NO_BUFFERINGSource
pub const FILE_FLAG_NO_BUFFERING: u32 = 0x20000000u32No system caching.
FILE_FLAG_RANDOM_ACCESSSource
pub const FILE_FLAG_RANDOM_ACCESS: u32 = 0x10000000u32A hint: access is random.
FILE_FLAG_SEQUENTIAL_SCANSource
pub const FILE_FLAG_SEQUENTIAL_SCAN: u32 = 0x8000000u32A hint: access is sequential.
FILE_FLAG_DELETE_ON_CLOSESource
pub const FILE_FLAG_DELETE_ON_CLOSE: u32 = 0x4000000u32Delete the file when its last handle closes.
FILE_FLAG_BACKUP_SEMANTICSSource
pub const FILE_FLAG_BACKUP_SEMANTICS: u32 = 0x2000000u32Open for backup or restore; needed to open a directory.
FILE_FLAG_POSIX_SEMANTICSSource
pub const FILE_FLAG_POSIX_SEMANTICS: u32 = 0x1000000u32Names are case-sensitive.
FILE_FLAG_OPEN_REPARSE_POINTSource
pub const FILE_FLAG_OPEN_REPARSE_POINT: u32 = 0x200000u32Open a reparse point itself, not its target.
FILE_FLAG_OPEN_NO_RECALLSource
pub const FILE_FLAG_OPEN_NO_RECALL: u32 = 0x100000u32Leave remote data in remote storage.
SECURITY_ANONYMOUSSource
pub const SECURITY_ANONYMOUS: u32 = 0x0u32Impersonate the client anonymously.
SECURITY_IDENTIFICATIONSource
pub const SECURITY_IDENTIFICATION: u32 = 0x10000u32Impersonate the client at identification level.
SECURITY_IMPERSONATIONSource
pub const SECURITY_IMPERSONATION: u32 = 0x20000u32Impersonate the client at impersonation level.
SECURITY_DELEGATIONSource
pub const SECURITY_DELEGATION: u32 = 0x30000u32Impersonate the client at delegation level.
SECURITY_CONTEXT_TRACKINGSource
pub const SECURITY_CONTEXT_TRACKING: u32 = 0x40000u32The security tracking mode is dynamic.
SECURITY_EFFECTIVE_ONLYSource
pub const SECURITY_EFFECTIVE_ONLY: u32 = 0x80000u32Only the enabled parts of the client's context are available.