File Management Control Codes
The following control codes are used in file management.
In this section
| Control Code | Description |
|---|---|
|
Signals the file system driver not to perform any I/O boundary checks on partition read or write calls. | |
|
Retrieves the object identifier for the specified file or directory. If no object identifier exists, using FSCTL_CREATE_OR_GET_OBJECT_ID creates one. | |
|
Retrieves the results of a CSV control operation. | |
|
Removes the object identifier from a specified file or directory. | |
|
Instructs the file system to copy a range of file bytes on behalf of an application. | |
|
Indicates to the storage system which ranges in the file are not needed to be stored. | |
|
Retrieves the information from various file system performance counters. | |
|
Retrieves the information from various file system performance counters. Support for this control code started with Windows 10. | |
|
Searches a directory for a file whose creator owner matches the specified SID. | |
|
Retrieves the current compression state of a file or directory on a volume whose file system supports per-stream compression. | |
|
Retrieves the first file record that is in use and is of a lesser than or equal ordinal value to the requested file reference number. | |
|
Retrieves the object identifier for the specified file or directory. | |
|
Retrieves information about the NTFS file system's self-healing mechanism. | |
|
Triggers the NTFS file system to start a self-healing cycle on a single file. | |
|
Closes an open UDF session on write-once media to make the media ROM compatible. | |
|
Notifies a server that a client application is ready to close a file. | |
|
Responds to notification that an opportunistic lock on a file is about to be broken. Use this operation to unlock all opportunistic locks on the file but keep the file open. | |
|
Responds to notification that an exclusive opportunistic lock on a file is about to be broken. Use this operation to indicate that the file should receive a level 2 opportunistic lock. | |
|
Enables the calling application to wait for completion of an opportunistic lock break. | |
|
Scans a file or alternate stream looking for ranges that may contain nonzero data. | |
|
Requests UDF-specific volume information. | |
|
Retrieves the defect management properties of the volume. Used for UDF file systems. | |
|
Recalls a file from storage media that Remote Storage manages, which is the hierarchical storage management software. | |
|
Requests a batch opportunistic lock on a file. | |
|
Requests a filter opportunistic lock on a file. | |
|
Requests an opportunistic lock (oplock) on a file and acknowledges that an oplock break has occurred. | |
|
Requests a level 1 opportunistic lock on a file. | |
|
Requests a level 2 opportunistic lock on a file. | |
|
Sets the compression state of a file or directory on a volume whose file system supports per-file and per-directory compression. | |
|
Sets the software defect management state for the specified file. Used for UDF file systems. | |
|
Sets the object identifier for the specified file or directory. | |
|
Modifies user data associated with the object identifier for the specified file or directory. | |
|
Sets the mode of an NTFS file system's self-healing capability. | |
|
Marks the indicated file as sparse or not sparse. In a sparse file, large ranges of zeros may not require disk allocation. | |
|
Fills a specified range of a file with zeros (0). | |
|
Indicates an NTFS file system file handle should have its clusters filled with zeros when it is deallocated. | |
|
Returns when the specified repairs are completed. |
The following control codes are used with file compression and decompression.
The following control codes are used with object identifiers.
- FSCTL_CREATE_OR_GET_OBJECT_ID
- FSCTL_DELETE_OBJECT_ID
- FSCTL_GET_OBJECT_ID
- FSCTL_SET_OBJECT_ID
- FSCTL_SET_OBJECT_ID_EXTENDED
The following control codes are used with opportunistic locks.
- FSCTL_OPBATCH_ACK_CLOSE_PENDING
- FSCTL_OPLOCK_BREAK_ACK_NO_2
- FSCTL_OPLOCK_BREAK_ACKNOWLEDGE
- FSCTL_OPLOCK_BREAK_NOTIFY
- FSCTL_REQUEST_BATCH_OPLOCK
- FSCTL_REQUEST_FILTER_OPLOCK
- FSCTL_REQUEST_OPLOCK
- FSCTL_REQUEST_OPLOCK_LEVEL_1
- FSCTL_REQUEST_OPLOCK_LEVEL_2
The following control codes are used with sparse files.
The following control codes are used with the NTFS self-healing mechanism.
The following control codes are used with UDF.
- FSCTL_MAKE_MEDIA_COMPATIBLE
- FSCTL_QUERY_ON_DISK_VOLUME_INFO
- FSCTL_QUERY_SPARING_INFO
- FSCTL_SET_DEFECT_MANAGEMENT
Related topics