Reparse Points and File Operations
Reparse points enable file system behavior that departs from the behavior most Windows developers may be accustomed to, therefore being aware of these behaviors when writing applications that manipulate files is vital to robust and reliable applications intended to access file systems that support reparse points. The extent of these considerations will depend on the specific implementation and associated file system filter behavior of a particular reparse point, which can be user-defined. For more information, see Reparse Points.
Consider the following examples regarding NTFS reparse point implementations, which include mounted folders, linked files, and the Microsoft Remote Storage Server:
- Backup applications that use file streams should specify BACKUP_REPARSE_DATA in the WIN32_STREAM_ID structure when backing up files with reparse points.
- Applications that use the CreateFile function should specify the FILE_FLAG_OPEN_REPARSE_POINT flag when opening the file if it is a reparse point. For more information, see Creating and Opening Files.
- The process of defragmenting files requires special handling for reparse points.
- Virus detection applications should search for reparse points that indicate linked files.
- Most applications should take special actions for files that have been moved to long-term storage, if only to notify the user that it may take a while to retrieve the file.
- The OpenFileById function will either open the file or the reparse point, depending on the use of the FILE_FLAG_OPEN_REPARSE_POINT flag.
- Symbolic links, as reparse points, have certain programming considerations specific to them.
- Volume management activities for reading update sequence number (USN) change journal records require special handling for reparse points when using the USN_RECORD and READ_USN_JOURNAL_DATA structures.
Related topics