 |
 |
File Management ..msdn Add comment |
 |
|
CopyFile
|
|
This function copies an existing file to a new file |
|
 |
 |
 |
|
CopyFileTransacted
|
|
Copies an existing file to a new file as a transacted operation, notifying the application of its progress through a callback function. |
|
 |
 |
 |
|
CreateDirectory
|
|
Creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.
|
|
 |
 |
 |
|
CreateFile
|
|
This function creates, opens, or truncates a file, communications resource, disk device, or console. It returns a handle that can be used to access the object. It can also open and return a handle to a directory.
Use the CloseHandle function to close an object handle returned by CreateFile |
|
 |
 |
 |
|
CreateFileTransacted
|
|
Creates or opens a file, file stream, or directory as a transacted operation. The function returns a handle that can be used to access the object. |
|
 |
 |
 |
|
CreateHardLink
|
|
Establishes a hard link between an existing file and a new file. This function is only supported on the NTFS file system.
|
|
 |
 |
 |
|
CreateSymbolicLink
|
|
Creates a symbolic link. |
|
 |
 |
 |
|
DeleteFile
|
|
The DeleteFile function deletes an existing file |
|
 |
 |
 |
|
DeleteFileTransacted
|
|
Deletes an existing file as a transacted operation. |
|
 |
 |
 |
|
FindClose
|
|
The FindClose function closes the specified search handle. The FindFirstFile and FindNextFile functions use the search handle to locate files with names that match a given name. |
|
 |
 |
 |
|
FindCloseChangeNotification
|
|
Stops change notification handle monitoring. |
|
 |
 |
 |
|
FindFirstChangeNotification
|
|
Creates a change notification handle and sets up initial change notification filter conditions.
A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree.
|
|
 |
 |
 |
|
FindFirstFile
|
|
The FindFirstFile function searches a directory for a file whose name matches the specified file name. FindFirstFile examines subdirectory names as well as file names. |
|
 |
 |
 |
|
FindNextChangeNotification
|
|
Requests that the operating system signal a change notification handle the next time it detects an appropriate change. |
|
 |
 |
 |
|
FindNextFile
|
|
The FindNextFile function continues a file search from a previous call to the FindFirstFile function. |
|
 |
 |
 |
|
FlushFileBuffers
|
|
Flushes the buffers of a specified file and causes all buffered data to be written to a file. |
|
 |
 |
 |
|
GetBinaryType
|
|
Determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.
|
|
 |
 |
 |
|
GetCurrentDirectory
|
|
The GetCurrentDirectory function retrieves the current directory for the current process.
|
|
 |
 |
 |
|
GetDriveType
|
|
The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive |
|
 |
 |
 |
|
GetFileAttributes
|
|
Retrieves attributes for a specified file or directory. |
|
 |
 |
 |
|
GetFileAttributesEx
|
|
Retrieves attributes for a specified file or directory. |
|
 |
 |
 |
|
GetFileInformationByHandle
|
|
The GetFileInformationByHandle function retrieves file information for a specified file. |
|
 |
 |
 |
|
GetFileType
|
|
The GetFileType function retrieves the file type for the specified file. |
|
 |
 |
 |
|
GetFullPathName
|
|
Retrieves the full path and file name of a specified file.
|
|
 |
 |
 |
|
GetLongPathName
|
|
The GetLongPathName function converts the specified path to its long form. If no long path is found, this function simply returns the specified name. |
|
 |
 |
 |
|
GetShortPathName
|
|
Retrieves the short path form of a specified input path |
|
 |
 |
 |
|
GetTempFileName
|
|
The GetTempFileName function creates a name for a temporary file.
The specified integer can be nonzero, in which case, the function creates the file name but does not create the file. If you specify zero for the integer, the function creates a unique file name and creates the file in the specified directory. |
|
 |
 |
 |
|
GetTempPath
|
|
The GetTempPath function retrieves the path of the directory designated for temporary files |
|
 |
 |
 |
|
LockFile
|
|
Locks a region in an open file. Locking a region prevents other processes from accessing the region. |
|
 |
 |
 |
|
MoveFile
|
|
The MoveFile function moves an existing file or a directory, including its children.
To specify how to move the file, use the MoveFileEx function |
|
 |
 |
 |
|
MoveFileTransacted
|
|
Moves an existing file or a directory, including its children, as a transacted operation. |
|
 |
 |
 |
|
OpenFile
|
|
The OpenFile function creates, opens, reopens, or deletes a file |
|
 |
 |
 |
|
QueryDosDevice
|
|
Retrieves information about MS-DOS device names. |
|
 |
 |
 |
|
ReadDirectoryChangesW
|
|
The ReadDirectoryChangesW function retrieves information describing the changes occurring within a directory. |
|
 |
 |
 |
|
ReadFile
|
|
Reads data from a file, starting at the position indicated by the file pointer. |
|
 |
 |
 |
|
RemoveDirectory
|
|
The RemoveDirectory function deletes an existing empty directory. To recursively delete files and subdirectories in a directory, use the SHFileOperation function. |
|
 |
 |
 |
|
RemoveDirectoryTransacted
|
|
Deletes an existing empty directory as a transacted operation. |
|
 |
 |
 |
|
ReplaceFile
|
|
Replaces one file with another file, with the option of creating a backup copy of the original file. |
|
 |
 |
 |
|
SearchPath
|
|
The SearchPath function searches for the specified file. |
|
 |
 |
 |
|
SetCurrentDirectory
|
|
The SetCurrentDirectory function changes the current directory for the current process. |
|
 |
 |
 |
|
SetEndOfFile
|
|
Sets the physical file size for the specified file to the current position of the file pointer. |
|
 |
 |
 |
|
SetFileAttributes
|
|
Sets a file"s attributes.
|
|
 |
 |
 |
|
SetFilePointer
|
|
The SetFilePointer function moves the file pointer of an open file. |
|
 |
 |
 |
|
SetFilePointerEx
|
|
Moves the file pointer of the specified file. |
|
 |
 |
 |
|
SetSearchPathMode
|
|
Sets the per-process mode that the SearchPath function uses when locating files. |
|
 |
 |
 |
|
UnlockFile
|
|
Unlocks a region in an open file. Unlocking a region enables other processes to access the region. |
|
 |
 |
 |
|
WriteFile
|
|
The WriteFile function writes data to a file and is designed for both synchronous and asynchronous operation. |
|
 |
 |
 |
|
_lclose
|
|
Closes the specified file so that it is no longer available for reading or writing. |
|
 |
 |
 |
|
_lopen
|
|
Opens an existing file and sets the file pointer to the beginning of the file. |
|
 |
 |
 |
 |
| Code examples: |
 |
|
|
 |
|
|