NTFS Junctions, trouble understanding the API
Asked Answered
B

1

4

Update: This question has evolved into a question about the NTFS filesystem filter driver how to use the Win32 API in backup applications and other programs that need to know what a file really is on disk? Junctions and reparse points are key concepts that I needed to consider and are the most confusing thing in the NTFS filesystem.

The original question follows:


  1. What is the Win32 API used to detect if a directory is a junction?
  2. 'Where' (for lack of better understanding) in the NTFS hierarchy are junctions stored?
  3. If I create a junction c:\thejunction_mydir do both directories become junctions of one-another? i.e. the created and the referenced
Biernat answered 31/12, 2010 at 18:13 Comment(1)
possible duplicate of Detect Symbolic Links, Junction Points, Mount Points and Hard LinksUnsought
B
2

How do I detect a reparse point?

Determining Whether a Directory Is a Mounted Folder is the answer. It shows how to determine whether a folder is a reparse point, and thus if it is also potentially: a Junction or a Symlink or a Mount-point.

Biernat answered 2/1, 2011 at 16:43 Comment(2)
This isn't actually true. Junctions are not like hardlinks; they are like softlinks in that they are just a pointer to a path, and not a second reference to the same location on the disk.Afore
But Windows Vista and up have a different softlink called a symbolic link, and that is recommended over Junctions any day.Biernat

© 2022 - 2024 — McMap. All rights reserved.