Upravit

Sdílet prostřednictvím


Using File Management

The following samples use the file management functions.

In this section

Topic Description
Adding Users to an Encrypted File
Example code that shows how to add a new user to an existing encrypted file by using the AddUsersToEncryptedFile function.
Appending One File to Another File
Example code that shows how an application can append one file to the end of another file, including how to open and close files, read and write to files, and lock and unlock files.
Creating and Using a Temporary File
Example code that shows how to create a temporary file for data manipulation purposes by using the GetTempFileName and GetTempPath functions.
Locking and Unlocking Byte Ranges in Files
Example code that shows byte range locking and unlocking by using the LockFileEx and UnlockFileEx functions.
Opening a File for Reading or Writing
Example code that shows how to use the CreateFile function to create a new file or open an existing file.
Retrieving and Changing File Attributes
Example code that shows how to use the GetFileAttributesEx function to retrieve file attributes.
Testing for the End of a File
Example code that shows how to test for the end of file during a synchronous read operation and during an asynchronous read operation.
Using Streams
Example code that shows how to use basic NTFS file system streams.