|
Boost : |
From: Bronek Kozicki (brok_at_[hidden])
Date: 2003-11-25 02:25:40
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
code FSCTL_SET_REPARSE_POINT. Another code FSCTL_GET_REPARSE_POINT can
be used to query for hard links. It's documented here:
http://msdn.microsoft.com/library/en-us/fileio/base/hard_links_and_junctions.asp
http://msdn.microsoft.com/library/en-us/fileio/base/reparse_points.asp
http://msdn.microsoft.com/library/en-us/fileio/base/file_systems_control_codes.asp
Simple utility for managing junctions (directory hard links) is
available here, with source:
http://www.sysinternals.com/ntw2k/source/misc.shtml#junction
B.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk