File Management Functions
The following functions are used to manage files.
In this section
| Function | Description |
|---|---|
|
Adds user keys to the specified encrypted file. | |
|
Determines whether the file I/O functions are using the ANSI or OEM character set code page. | |
|
Cancels all pending input and output (I/O) operations that are issued by the calling thread for the specified file. | |
|
Marks any outstanding I/O operations for the specified file handle. The function only cancels I/O operations in the current process, regardless of which thread created the I/O operation. | |
|
Marks pending synchronous I/O operations that are issued by the specified thread as canceled. | |
|
Determines whether the specified name can be used to create a file on a FAT file system. | |
|
Closes an encrypted file after a backup or restore operation, and frees associated system resources. | |
|
Copies an existing file to a new file. | |
|
Copies an existing file to a new file, notifying the application of its progress through a callback function. | |
|
An application-defined callback function used with the CopyFile2 function. | |
|
Copies an existing file to a new file, notifying the application of its progress through a callback function. | |
|
Copies an existing file to a new file as a transacted operation, notifying the application of its progress through a callback function. | |
|
An application-defined callback function used with the CopyFileEx, MoveFileTransacted, and MoveFileWithProgress functions. | |
|
Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. | |
|
Creates or opens a file. | |
|
Creates or opens a file, file stream, or directory as a transacted operation. | |
|
Establishes a hard link between an existing file and a new file. | |
|
Establishes a hard link between an existing file and a new file as a transacted operation. | |
|
Creates an input/output (I/O) completion port and associates it with a specified file handle, or creates an I/O completion port that is not yet associated with a file handle, allowing association at a later time. | |
|
Creates a symbolic link. | |
|
Creates a symbolic link as a transacted operation. | |
|
Decrypts an encrypted file or directory. | |
|
Deletes an existing file. | |
|
Deletes an existing file as a transacted operation. | |
|
Copies the EFS metadata from one file or directory to another. | |
|
Encrypts a file or directory. | |
|
Disables or enables encryption of the specified directory and the files in it. | |
|
An application-defined callback function used with ReadEncryptedFileRaw. | |
|
Retrieves the encryption status of the specified file. | |
|
An application-defined callback function used with the ReadFileEx and WriteFileEx functions. It is called when the asynchronous input and output (I/O) operation is completed or canceled and the calling thread is in an alertable state. | |
|
Closes a file search handle opened by the FindFirstFile, FindFirstFileEx, FindFirstFileNameW, FindFirstFileNameTransactedW, FindFirstFileTransacted, FindFirstStreamTransactedW, or FindFirstStreamW functions. | |
|
Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used). | |
|
Searches a directory for a file or subdirectory with a name and attributes that match those specified. | |
|
Creates an enumeration of all the hard links to the specified file as a transacted operation. The function returns a handle to the enumeration that can be used on subsequent calls to the FindNextFileNameW function. | |
|
Creates an enumeration of all the hard links to the specified file. The FindFirstFileNameW function returns a handle to the enumeration that can be used on subsequent calls to the FindNextFileNameW function. | |
|
Searches a directory for a file or subdirectory with a name that matches a specific name as a transacted operation. | |
|
Enumerates the first stream in the specified file or directory as a transacted operation. | |
|
Enumerates the first stream with a ::$DATA stream type in the specified file or directory. | |
|
Continues a file search from a previous call to the FindFirstFile, FindFirstFileEx, or FindFirstFileTransacted functions. | |
|
Continues enumerating the hard links to a file using the handle returned by a successful call to the FindFirstFileNameW function. | |
|
Continues a stream search started by a previous call to the FindFirstStreamW function. | |
|
Flushes the buffers of a specified file and causes all buffered data to be written to a file. | |
|
Frees a certificate hash list. | |
|
Determines whether a file is an executable (.exe) file, and if so, which subsystem runs the executable file. | |
|
Retrieves the actual number of bytes of disk storage used to store a specified file. | |
|
Retrieves the actual number of bytes of disk storage used to store a specified file as a transacted operation. | |
|
Retrieves the original name of a compressed file, if the file was compressed by the Lempel-Ziv algorithm. | |
|
Retrieves file system attributes for a specified file or directory. | |
|
Retrieves attributes for a specified file or directory. | |
|
Retrieves file system attributes for a specified file or directory as a transacted operation. | |
|
Retrieves the bandwidth reservation properties of the volume on which the specified file resides. | |
|
Retrieves file information for the specified file. | |
|
Retrieves file information for the specified file. | |
|
Retrieves the size of the specified file, in bytes. | |
|
Retrieves the size of the specified file. | |
|
Retrieves the file type of the specified file. | |
|
Retrieves the final path for the specified file. | |
|
Retrieves the full path and file name of the specified file. | |
|
Retrieves the full path and file name of the specified file as a transacted operation. | |
|
Converts the specified path to its long form. | |
|
Converts the specified path to its long form as a transacted operation. | |
|
Attempts to dequeue an I/O completion packet from the specified I/O completion port. | |
|
Retrieves multiple completion port entries simultaneously. | |
|
Retrieves the short path form of the specified path. | |
|
Creates a name for a temporary file. If a unique file name is generated, an empty file is created and the handle to it is released; otherwise, only a file name is generated. | |
|
Retrieves the path of the directory designated for temporary files. | |
|
An application-defined callback function used with WriteEncryptedFileRaw. The system calls ImportCallback one or more times, each time to retrieve a portion of a backup file's data. | |
|
Locks the specified file for exclusive access by the calling process. | |
|
Locks the specified file for exclusive access by the calling process. This function can operate either synchronously or asynchronously and can request either an exclusive or a shared lock. | |
|
Closes a file that was opened by using the LZOpenFile function. | |
|
Copies a source file to a destination file. | |
|
Allocates memory for the internal data structures required to decompress files, and then creates and initializes them. | |
|
Creates, opens, reopens, or deletes the specified file. | |
|
Reads (at most) the specified number of bytes from a file and copies them into a buffer. | |
|
Moves a file pointer the specified number of bytes from a starting position. | |
|
Moves an existing file or a directory, including its children. | |
|
Moves an existing file or directory, including its children, with various move options. | |
|
Moves an existing file or a directory, including its children, as a transacted operation. | |
|
Moves a file or directory, including its children. You can provide a callback function that receives progress notifications. | |
|
Opens an encrypted file in order to backup (export) or restore (import) the file. | |
|
Creates, opens, reopens, or deletes a file. | |
|
Opens the file that matches the specified identifier. | |
|
Posts an I/O completion packet to an I/O completion port. | |
|
Retrieves a list of recovery agents for the specified file. | |
|
Retrieves a list of users for the specified file. | |
|
Backs up (export) encrypted files. | |
|
Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device. | |
|
Reads data from the specified file or input/output (I/O) device. It reports its completion status asynchronously, calling the specified completion routine when reading is completed or canceled and the calling thread is in an alertable wait state. | |
|
Reads data from a file and stores it in an array of buffers. | |
|
Removes specified certificate hashes from a specified file. | |
|
Reopens the specified file system object with different access rights, sharing mode, and flags. | |
|
Replaces one file with another file, with the option of creating a backup copy of the original file. | |
|
Searches for a specified file in a specified path. | |
|
Sets the physical file size for the specified file to the current position of the file pointer. | |
|
Causes the file I/O functions to use the ANSI character set code page for the current process. | |
|
Causes the file I/O functions for the process to use the OEM character set code page. | |
|
Sets the attributes for a file or directory. | |
|
Sets the attributes for a file or directory as a transacted operation. | |
|
Requests that bandwidth for the specified file stream be reserved. The reservation is specified as a number of bytes in a period of milliseconds for I/O requests on the specified file handle. | |
|
Sets the notification modes for a file handle, allowing you to specify how completion notifications work for the specified file. | |
|
Sets the file information for the specified file. | |
|
Associates a virtual address range with the specified file handle. | |
|
Moves the file pointer of the specified file. | |
|
Moves the file pointer of the specified file. | |
|
Sets the short name for the specified file. | |
|
Sets the valid data length of the specified file. This function is useful in very limited scenarios. For more information, see the Remarks section. | |
|
Sets the per-process mode that the SearchPath function uses when locating files. | |
|
Sets the user's current key to the specified certificate. | |
|
Unlocks a region in an open file. | |
|
Unlocks a region in the specified file. This function can operate either synchronously or asynchronously. | |
|
Enumerates all the data sources from a specified provider for a specified volume. | |
|
Callback function that gets called for each data source in response to a call to WofEnumEntries. | |
|
Callback function that gets called for each file backed by an external data source, such as a WIM file. | |
|
Enumerates all of the files which are compressed with a specified compression algorithm on a specified volume. | |
|
Used to query the version of the driver used to support a particular provider. | |
|
Used to determine if a file is being backed by a physical file or is backed by a system data provider, and optionally indicates which provider or additional data about the file. | |
|
Used to change a file from being backed by a physical file to one backed by a system data provider. | |
|
Indicates whether compression should be used on a particular volume, and if so, which compression algorithm should be used. | |
|
Adds a single WIM data source to a volume such that files can be created on the volume which are stored within the WIM. | |
|
Enumerates all of the files which are being backed by a specified WIM data source on a specified volume. | |
|
Removes a single WIM data source from backing files on a volume. | |
|
Temporarily removes a WIM data source from backing files on a volume until the volume is remounted or the data source is updated with WofWimUpdateEntry. | |
|
Updates a WIM entry to point to a different WIM file location. | |
|
Disables file system redirection for the calling thread. File system redirection is enabled by default. | |
|
Enables or disables file system redirection for the calling thread. | |
|
Restores file system redirection for the calling thread. | |
|
Restores (import) encrypted files. | |
|
Writes data to the specified file or input/output (I/O) device. | |
|
Writes data to the specified file or input/output (I/O) device. It reports its completion status asynchronously, calling the specified completion routine when writing is completed or canceled and the calling thread is in an alertable wait state. | |
|
Retrieves data from an array of buffers and writes the data to a file. |
The following functions are used with file I/O.
- CancelIo
- CancelIoEx
- CancelSynchronousIo
- CreateIoCompletionPort
- FlushFileBuffers
- GetQueuedCompletionStatus
- GetQueuedCompletionStatusEx
- LockFile
- LockFileEx
- PostQueuedCompletionStatus
- ReadFile
- ReadFileEx
- ReadFileScatter
- SetEndOfFile
- SetFileCompletionNotificationModes
- SetFileIoOverlappedRange
- SetFilePointer
- SetFilePointerEx
- UnlockFile
- UnlockFileEx
- WriteFile
- WriteFileEx
- WriteFileGather
The following functions are used with the encrypted file system.
- AddUsersToEncryptedFile
- CloseEncryptedFileRaw
- DecryptFile
- DuplicateEncryptionInfoFile
- EncryptFile
- EncryptionDisable
- FileEncryptionStatus
- FreeEncryptionCertificateHashList
- OpenEncryptedFileRaw
- QueryRecoveryAgentsOnEncryptedFile
- QueryUsersOnEncryptedFile
- ReadEncryptedFileRaw
- RemoveUsersFromEncryptedFile
- SetUserFileEncryptionKey
- WriteEncryptedFileRaw
The following functions are used with the file system redirector.
The following functions are used to decompress files that are compressed by the Lempel-Ziv algorithm.
The following callback functions are used in file I/O.