INDEX | CLUSTER | FEATURES | SHORT | FRAMES | NO FRAMES |
-- The 'CreateFile' function creates, opens, or truncates a file, pipe,
-- 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.
-- BOOL
-- 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. Note that CreateDirectory
-- does not have a template parameter, while CreateDirectoryEx does.
-- Parameters
-- lpPathName - Points to a null-terminated string that specifies
-- the path of the directory to be created.
-- There is a default string size limit for paths of
-- MAX_PATH characters. This limit is related to how
-- the CreateDirectory function parses paths.
-- Windows NT: An application can transcend this limit
-- and send in paths longer than MAX_PATH characters
-- by calling the wide (W) version of CreateDirectory
-- and prepending "\\?\" to the path. The "\\?\" tells
-- the function to turn off path parsing; it lets
-- paths longer than MAX_PATH be used with
-- CreateDirectoryW. This also works with UNC names.
-- The "\\?\" is ignored as part of the path. For
-- example, "\\?\C:\myworld\private" is seen as
-- "C:\myworld\private", and
-- "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as
-- "\\bill_g_1\hotstuff\coolapps".
-- lpSecurityAttributes - Points to a SECURITY_ATTRIBUTES structure
-- that specifies the security attributes
-- for the directory to be created. The file
-- system must support this parameter for it
-- to have an effect.
-- Return Value
-- If the function succeeds, the return value is True_.
-- If the function fails, the return value is False_.
-- To get extended error information, call GetLastError.
-- The MoveFile function renames an existing file or a directory
-- (including all its children).
-- Parameters
-- lpExistingFileName Points to a null-terminated string
-- that names an existing file or directory.
-- lpNewFileName Points to a null-terminated string
-- that specifies the new name of a file or
-- directory. The new name must not already exist.
-- A new file may be on a different file system
-- or drive. A new directory must be on
-- the same drive.
-- Return Values
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- copies an existing file to a new file.
-- Parameters
-- lpExistingFileName - Points to a null-terminated string that
-- specifies the name of an existing file.
-- lpNewFileName - Points to a null-terminated string that
-- specifies the name of the new file.
-- bFailIfExists - Specifies how this operation is to proceed
-- if a file of the same name as that
-- specified by lpNewFileName already exists.
-- If this parameter is TRUE and the new file
-- already exists, the function fails.
-- If this parameter is FALSE and the new file
-- already exists, the function overwrites
-- the existing file and succeeds.
-- Return Value
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- BOOL
-- The DeleteFile function deletes an existing file.
-- Parameters
-- lpFileName Points to a null-terminated string that specifies the file to be deleted.
-- Return Value
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- BOOL
-- Deletes an existing empty directory.
-- Parameters
-- lpPathName - Points to a null-terminated string that specifies
-- the path of the directory to be removed. The path
-- must specify an empty directory, and the calling
-- process must have delete access to the directory.
-- Return Values
-- If the function succeeds, the return value is True_.
-- If the function fails, the return value is False_.
-- To get extended error information, call GetLastError.
-- The `GetCurrentDirectory' function retrieves the current directory
-- for the current process
-- Changes the current directory for the current process.
-- Parameters
-- lpPathName - Points to a null-terminated string that specifies
-- the path to the new current directory.
-- This parameter may be a relative path or a fully
-- qualified path. In either case, the fully qualified
-- path of the specified directory is calculated and
-- stored as the current directory.
-- Return Values
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- Retrieves the full path and filename of a specified file.
-- Parameters
-- lpFileName - Points to a null-terminated string that specifies
-- a valid filename. This string can use either short
-- (the 8.3 form) or long filenames.
-- nBufferLength - Specifies the size, in characters, of the
-- buffer for the drive and path.
-- lpBuffer - Points to a buffer that contains the null-terminated
-- string for the name of the drive and path.
-- lpFilePart - Points to a variable that receives the address
-- (in lpBuffer) of the final filename component in
-- the path. This filename component is the long
-- filename, if any, rather than the 8.3 form of the
-- filename.
-- Return Value
-- If the GetFullPathName function succeeds, the return value is
-- the length, in characters, of the string copied to lpBuffer,
-- not including the terminating null character.
-- If the lpBuffer buffer is too small, the return value is the
-- size of the buffer, in characters, required to hold the path.
-- If the function fails, the return value is zero.
-- To get extended error information, call GetLastError.
-- Remarks
-- The GetFullPathName function merges the name of the current
-- drive and directory with the specified filename to determine
-- the full path and filename of the specified file. It also
-- calculates the address of the filename portion of the full
-- path and filename. This function does not verify that the
-- resulting path and filename are valid or that they refer to
-- an existing file on the associated volume.
-- Searches a directory for a file whose name matches
-- the specified filename, the function cannot be used for
-- attribute-based searches. FindFirstFile examines subdirectory
-- names as well as filenames.
-- Parameters:
-- lpFileName - Points to a null-terminated string that specifies
-- a valid directory or path and filename, which can
-- contain wildcard characters (* and ?)
-- lpFindFileData - Points to the WIN32_FIND_DATA structure that
-- receives information about the found file or
-- subdirectory. The structure can be used in
-- subsequent calls to the FindNextFile or
-- FindClose function to refer to the file or
-- subdirectory.
-- Return Value
-- If the function succeeds, the return value is a search handle
-- used in a subsequent call to FindNextFile or FindClose.
-- If the function fails, the return value is INVALID_HANDLE_VALUE.
-- To get extended error information, call GetLastError.
-- Remarks
-- The FindFirstFile function opens a search handle and returns
-- information about the first file whose name matches the
-- specified pattern. Once the search handle is established,
-- you can use the FindNextFile function to search for other
-- files that match the same pattern. When the search handle
-- is no longer needed, close it by using the FindClose function.
-- Continues a file search from a previous call to the FindFirstFile.
-- Parameters
-- hFindFile - Identifies a search handle returned by a
-- previous call to the FindFirstFile function.
-- lpFindFileData - Points to the WIN32_FIND_DATA structure that
-- receives information about the found file or
-- subdirectory. The structure can be used in
-- subsequent calls to FindNextFile to refer to
-- the found file or directory.
-- Return Value
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- If no matching files can be found, the GetLastError function
-- returns ERROR_NO_MORE_FILES.
-- Close the specified search handle.
-- Parameter
-- hFindFile - Identifies the search handle. This handle must
-- have been previously opened by the FindFirstFile.
-- Return Value
-- If the function succeeds, the return value is TRUE.
-- If the function fails, the return value is FALSE.
-- To get extended error information, call GetLastError.
-- The GetFileAttributes function returns attributes for a specified
-- file or directory.
-- Parameter
-- lpFileName Points to a null-terminated string that specifies
-- the name of a file or directory.
-- Return Value
-- If the function succeeds, the return value contains the
-- attributes of the specified file or directory.
-- If the function fails, the return value is 0xFFFFFFFF.
-- To get extended error information, call GetLastError.
-- The GetFileSize function retrieves the size, in bytes, of
-- the specified file.
-- Parameters
-- hFile Specifies an open handle of the file whose size
-- is being returned. The handle must have been
-- created with either GENERIC_READ or GENERIC_WRITE
-- access to the file.
-- lpFileSizeHigh Points to the variable where the high-order word
-- of the file size is returned. This parameter can
-- be NULL if the application does not require the
-- high-order word.
-- Return Value
-- If the function succeeds, the return value is the low-order
-- doubleword of the file size, and, if lpFileSizeHigh is non-NULL,
-- the function puts the high-order doubleword of the file size into
-- the variable pointed to by that parameter.
-- If the function fails and lpFileSizeHigh is NULL, the return
-- value is 0xFFFFFFFF. To get extended error information, call
-- GetLastError.
-- If the function fails and lpFileSizeHigh is non-NULL, the return
-- value is 0xFFFFFFFF and GetLastError will return a value other
-- than NO_ERROR.
-- The 'GetFileType' function returns the type of the specified file.
-- The `GetTempFileName' function creates a name for a temporary file.
-- The filename is the concatenation of specified path and prefix
-- strings, a hexadecimal string formed from a specified integer,
-- and the .TMP extension.
-- The specified integer can be nonzero, in which case, the function
-- creates the filename but does not create the file. If you specify
-- zero for the integer, the function creates a unique filename and
-- creates the file in the specified directory.
-- The `GetTempPath' function retrieves the path of the directory
-- designated for temporary files. This function supersedes the
-- `GetTempDrive' function.
-- BOOL
-- The ReadFile function reads data from a file, starting at the
-- position indicated by the file pointer. After the read operation
-- has been completed, the file pointer is adjusted by the number
-- of bytes actually read, unless the file handle is created with
-- the overlapped attribute. If the file handle is created for
-- overlapped input and output (I/O), the application must adjust
-- the position of the file pointer after the read operation.
-- The 'SetEndOfFile' procedure moves the end-of-file (EOF) position
-- for the specified file to the current position of the file pointer.
-- The 'SetFilePointer' function moves the file pointer of an open file.
-- The 'WriteFile' function writes data to a file and is designed
-- for both synchronous and asynchronous operation. The function starts
-- writing data to the file at the position indicated by the file pointer.
-- After the write operation has been completed, the file pointer is
-- adjusted by the number of bytes actually written, except when the file
-- is opened with FILE_FLAG_OVERLAPPED. If the file handle was created
-- for overlapped input and output (I/O), the application must adjust
-- the position of the file pointer after the write operation is finished.
-- BOOL
-- Retrieve information about the specified file
-- Parameters
-- hFile - Identifies the file for which
-- information is returned.
-- lpFileInformation - Points to a BY_HANDLE_FILE_INFORMATION
-- structure that receives the file
-- information. The structure can be used
-- in subsequent calls to
-- GetFileInformationByHandle to refer
-- to the information about the file.
-- Return Value
-- If the function succeeds, the return value is True_.
-- If the function fails, the return value is False_.
-- To get extended error information, call GetLastError.
-- UINT
-- Determine whether a disk drive is a removable, fixed,
-- CD-ROM, RAM disk, or network drive
-- Parameter
-- lpRootPathName - Points to a null-terminated string that
-- specifies the root directory of the disk
-- to return information about. If
-- lpRootPathName is NULL, the function uses
-- the root of the current directory.
-- Return Value
-- The return value specifies the type of drive. See
-- `WAPI_DRIVE_TYPES' for details
-- BOOL
-- Returns information about a file system and volume whose root
-- directory is specified.
-- Parameters
-- lpRootPathName
-- Points to a string that contains the root directory
-- of the volume to be described. If this parameter is NULL,
-- the root of the current directory is used.
-- lpVolumeNameBuffer
-- Points to a buffer that receives the name
-- of the specified volume.
-- nVolumeNameSize
-- Specifies the length, in characters, of the volume
-- name buffer. This parameter is ignored if the volume
-- name buffer is not supplied.
-- lpVolumeSerialNumber
-- Points to a variable that receives the volume serial
-- number. This parameter can be NULL if the serial number
-- is not required.
-- lpMaximumComponentLength
-- Points to a doubleword value that receives the maximum
-- length, in characters, of a filename component
-- supported by the specified file system. A filename
-- component is that portion of a filename between backslashes.
-- lpFileSystemFlags
-- Points to a doubleword that receives flags associated
-- with the specified file system.
--
-- Value Meaning
--
-- FS_CASE_IS_PRESERVED If this flag is set, the file system preserves the case of filenames when it places a name on disk.
-- FS_CASE_SENSITIVE If this flag is set, the file system supports case-sensitive filenames.
-- FS_UNICODE_STORED_ON_DISK If this flag is set, the file system supports Unicode in filenames as they appear on disk.
-- FS_PERSISTENT_ACLS If this flag is set, the file system preserves and enforces ACLs. For example, NTFS preserves and enforces ACLs, and FAT does not.
-- FS_FILE_COMPRESSION The file system supports file-based compression.
-- FS_VOL_IS_COMPRESSED The specified volume is a compressed volume; for example, a DoubleSpace volume.
-- lpFileSystemNameBuffer
-- Points to a buffer that receives the name of the file
-- system (such as FAT or NTFS).
-- nFileSystemNameSize
-- Specifies the length, in characters, of the file system
-- name buffer. This parameter is ignored if the file system
-- name buffer is not supplied.
-- Return Value
-- If all the requested information is retrieved, the return
-- value is True_; otherwise, it is False_.
-- To get extended error information, call GetLastError.
INDEX | CLUSTER | FEATURES | SHORT | FRAMES | NO FRAMES |