fileapi.h header

This header is used by multiple technologies. For more information, see:

fileapi.h contains the following programming interfaces:

Functions

 
AreFileApisANSI

Determines whether the file I/O functions are using the ANSI or OEM character set code page.
AreShortNamesEnabled

The AreShortNamesEnabled function determines whether short names are enabled for the specified volume.
CompareFileTime

Compares two file times.
CreateDirectoryA

Creates a new directory. (CreateDirectoryA)
CreateDirectoryW

Creates a new directory. (CreateDirectoryW)
CreateFile2

Creates or opens a file or I/O device.
CreateFileA

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. (ANSI)
CreateFileW

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. (Unicode)
DefineDosDeviceW

Defines, redefines, or deletes MS-DOS device names. (DefineDosDeviceW)
DeleteFileA

Deletes an existing file. (DeleteFileA)
DeleteFileW

Deletes an existing file. (DeleteFileW)
DeleteVolumeMountPointW

Deletes a drive letter or mounted folder. (DeleteVolumeMountPointW)
FileTimeToLocalFileTime

Converts a file time to a local file time.
FindClose

Closes a file search handle opened by the FindFirstFile, FindFirstFileEx, FindFirstFileNameW, FindFirstFileNameTransactedW, FindFirstFileTransacted, FindFirstStreamTransactedW, or FindFirstStreamW functions.
FindCloseChangeNotification

Stops change notification handle monitoring.
FindFirstChangeNotificationA

Creates a change notification handle and sets up initial change notification filter conditions. (ANSI)
FindFirstChangeNotificationW

Creates a change notification handle and sets up initial change notification filter conditions. (Unicode)
FindFirstFileA

Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used). (ANSI)
FindFirstFileExA

Searches a directory for a file or subdirectory with a name and attributes that match those specified. (FindFirstFileExA)
FindFirstFileExW

Searches a directory for a file or subdirectory with a name and attributes that match those specified. (FindFirstFileExW)
FindFirstFileNameW

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.
FindFirstFileW

Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used). (Unicode)
FindFirstStreamW

Enumerates the first stream with a ::$DATA stream type in the specified file or directory.
FindFirstVolumeW

Retrieves the name of a volume on a computer. (FindFirstVolumeW)
FindNextChangeNotification

Requests that the operating system signal a change notification handle the next time it detects an appropriate change.
FindNextFileA

Continues a file search from a previous call to the FindFirstFile, FindFirstFileEx, or FindFirstFileTransacted functions. (ANSI)
FindNextFileNameW

Continues enumerating the hard links to a file using the handle returned by a successful call to the FindFirstFileNameW function.
FindNextFileW

Continues a file search from a previous call to the FindFirstFile, FindFirstFileEx, or FindFirstFileTransacted functions. (Unicode)
FindNextStreamW

Continues a stream search started by a previous call to the FindFirstStreamW function.
FindNextVolumeW

Continues a volume search started by a call to the FindFirstVolume function. (FindNextVolumeW)
FindVolumeClose

Closes the specified volume search handle.
FlushFileBuffers

Flushes the buffers of a specified file and causes all buffered data to be written to a file.
GetCompressedFileSizeA

Retrieves the actual number of bytes of disk storage used to store a specified file. (ANSI)
GetCompressedFileSizeW

Retrieves the actual number of bytes of disk storage used to store a specified file. (Unicode)
GetDiskFreeSpaceA

Retrieves information about the specified disk, including the amount of free space on the disk. (ANSI)
GetDiskFreeSpaceExA

Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread. (ANSI)
GetDiskFreeSpaceExW

Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread. (Unicode)
GetDiskFreeSpaceW

Retrieves information about the specified disk, including the amount of free space on the disk. (Unicode)
GetDiskSpaceInformationA

Gets disk space information for a volume at a given root path.
GetDiskSpaceInformationW

Gets disk space information for a volume at a given root path.
GetDriveTypeA

Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (ANSI)
GetDriveTypeW

Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (Unicode)
GetFileAttributesA

Retrieves file system attributes for a specified file or directory. (ANSI)
GetFileAttributesExA

Retrieves attributes for a specified file or directory. (ANSI)
GetFileAttributesExW

Retrieves attributes for a specified file or directory. (Unicode)
GetFileAttributesW

Retrieves file system attributes for a specified file or directory. (Unicode)
GetFileInformationByHandle

Retrieves file information for the specified file. (GetFileInformationByHandle)
GetFileSize

Retrieves the size of the specified file, in bytes.
GetFileSizeEx

Retrieves the size of the specified file.
GetFileTime

Retrieves the date and time that a file or directory was created, last accessed, and last modified.
GetFileType

Retrieves the file type of the specified file.
GetFinalPathNameByHandleA

Retrieves the final path for the specified file. (ANSI)
GetFinalPathNameByHandleW

Retrieves the final path for the specified file. (Unicode)
GetFullPathNameA

Retrieves the full path and file name of the specified file. (ANSI)
GetFullPathNameW

Retrieves the full path and file name of the specified file. (Unicode)
GetLogicalDrives

Retrieves a bitmask representing the currently available disk drives.
GetLogicalDriveStringsW

Fills a buffer with strings that specify valid drives in the system. (GetLogicalDriveStringsW)
GetLongPathNameA

Converts the specified path to its long form. (ANSI)
GetLongPathNameW

Converts the specified path to its long form. (Unicode)
GetShortPathNameW

Retrieves the short path form of the specified path. (GetShortPathNameW)
GetTempFileNameA

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. (GetTempFileNameA)
GetTempFileNameW

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. (GetTempFileNameW)
GetTempPath2A

Retrieves the path of the directory designated for temporary files, based on the privileges of the calling process. (ANSI)
GetTempPath2W

Retrieves the path of the directory designated for temporary files, based on the privileges of the calling process. (Unicode)
GetTempPathA

Retrieves the path of the directory designated for temporary files. (ANSI)
GetTempPathW

Retrieves the path of the directory designated for temporary files. (Unicode)
GetVolumeInformationA

Retrieves information about the file system and volume associated with the specified root directory. (ANSI)
GetVolumeInformationByHandleW

Retrieves information about the file system and volume associated with the specified file.
GetVolumeInformationW

Retrieves information about the file system and volume associated with the specified root directory. (Unicode)
GetVolumeNameForVolumeMountPointW

Retrieves a volume GUID path for the volume that is associated with the specified volume mount point ( drive letter, volume GUID path, or mounted folder). (GetVolumeNameForVolumeMountPointW)
GetVolumePathNamesForVolumeNameW

Retrieves a list of drive letters and mounted folder paths for the specified volume. (GetVolumePathNamesForVolumeNameW)
GetVolumePathNameW

Retrieves the volume mount point where the specified path is mounted. (GetVolumePathNameW)
LocalFileTimeToFileTime

Converts a local file time to a file time based on the Coordinated Universal Time (UTC).
LockFile

Locks the specified file for exclusive access by the calling process.
LockFileEx

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.
QueryDosDeviceW

Retrieves information about MS-DOS device names. (QueryDosDeviceW)
ReadFile

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.
ReadFileEx

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.
ReadFileScatter

Reads data from a file and stores it in an array of buffers.
RemoveDirectoryA

Deletes an existing empty directory. (ANSI)
RemoveDirectoryW

Deletes an existing empty directory. (Unicode)
SetEndOfFile

Sets the physical file size for the specified file to the current position of the file pointer.
SetFileApisToANSI

Causes the file I/O functions to use the ANSI character set code page for the current process.
SetFileApisToOEM

Causes the file I/O functions for the process to use the OEM character set code page.
SetFileAttributesA

Sets the attributes for a file or directory. (ANSI)
SetFileAttributesW

Sets the attributes for a file or directory. (Unicode)
SetFileInformationByHandle

Sets the file information for the specified file.
SetFileIoOverlappedRange

Associates a virtual address range with the specified file handle.
SetFilePointer

Moves the file pointer of the specified file. (SetFilePointer)
SetFilePointerEx

Moves the file pointer of the specified file. (SetFilePointerEx)
SetFileTime

Sets the date and time that the specified file or directory was created, last accessed, or last modified.
SetFileValidData

Sets the valid data length of the specified file. This function is useful in very limited scenarios. For more information, see the Remarks section.
UnlockFile

Unlocks a region in an open file.
UnlockFileEx

Unlocks a region in the specified file. This function can operate either synchronously or asynchronously.
WriteFile

Writes data to the specified file or input/output (I/O) device.
WriteFileEx

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.
WriteFileGather

Retrieves data from an array of buffers and writes the data to a file.

Structures

 
BY_HANDLE_FILE_INFORMATION

Contains information that the GetFileInformationByHandle function retrieves.
CREATEFILE2_EXTENDED_PARAMETERS

Contains optional extended parameters for CreateFile2.
DISK_SPACE_INFORMATION

The DISK_SPACE_INFORMATION structure contains information about the disk space for a particular volume.
WIN32_FILE_ATTRIBUTE_DATA

Contains attribute information for a file or directory.
WIN32_FIND_STREAM_DATA

Contains information about the stream found by the FindFirstStreamW or FindNextStreamW function.

Enumerations

 
STREAM_INFO_LEVELS

Defines values that are used with the FindFirstStreamW function to specify the information level of the returned data.