Using Files

The Windows file functions enable applications to access files regardless of the underlying file system. However, their functionality may vary depending on the operating system in use. If you have questions about a specific function, consult the reference information for that function.

For functions that manipulate files, the filenames may be relative to the current directory. A filename is relative to the current directory if it does not begin with a disk designator or directory name separator, such as a backslash (\). If the filename begins with a disk designator, it is a fully qualified path.

The examples in this section illustrate how to perform the following tasks:

·Creating and opening files

·Reading, writing, and locking files

·Creating and using a temporary file

·Searching for files and changing file attributes

·Monitoring changes in a directory or directory tree

·Testing for the end of the file

·Retrieving a file pointer