Boost logo

Boost :

From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2003-11-25 14:32:14

"Bronek Kozicki" <brok_at_[hidden]> writes:

> Victor A. Wagner, Jr. <vawjr_at_[hidden]> wrote:
>> There _is_ a mechanism for creating hard links to directories on
>> NTFS. I don't know what the relevant runtime calls are, but I have a
>> utility that creates them. When you do a dir on a directory which

> the same mechanism can be used to create hard links to files on NTFS.
> This mechanism is called "reparse points". You can create hard links
> with DeviceIoControl (Win32 Storage API) function called with control
> be used to query for hard links. It's documented here:


> Simple utility for managing junctions (directory hard links) is
> available here, with source:

AFAIK, junctions are not like POSIX hard links because they do not
involve a reference count, and can refer to directories on other
filesystems. Thus, they are like (absolute-path) symbolic links. The
real question, I suppose, is whether NTFS supports these "junctions" or
symbolic links to files in addition to directories. I am guessing the
answer in no, and in any case the filesystem library could simply throw
an exception if the user attempted to create a file symbolic link on

(Note that the hard links created by CreateHardLink and BackupWrite
_are_ like POSIX hard links, but these can only be used on files, not

Jeremy Maitin-Shepard

Boost list run by bdawes at, gregod at, cpdaniel at, john at