大网数据广告活动
磁盘与文件系统

Reparse Points and File Operations

· 52CE 我爱测

Describes how reparse points enable file system behavior that departs from behavior most Windows developers expect.

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

Determining Whether a Directory Is a Mounted Folder

Creating Mounted Folders

Symbolic Link Effects on File Systems Functions

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。