Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

NTFS junction

by H4 (Acolyte)
on Aug 17, 2011 at 17:56 UTC ( [id://920732]=perlquestion: print w/replies, xml ) Need Help??

H4 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I'm trying to traverse a Win32 NTFS directory tree ignoring junctions. Unfortunately for junctions the -d operator returns 1 (i.e. a true value), and the -l operator returns "" (a false value), so I cannot tell it apart from a "normal" directory. The stat function seems not to help either. I've searched up and down the internet but nobody seems to have come across this issue so far.

Any ideas? Thanks!

Replies are listed 'Best First'.
Re: NTFS junction
by ikegami (Patriarch) on Aug 17, 2011 at 18:40 UTC
      Looks promising although I'm not sure that a junction is the same as a symlink. The builtin readlink function returns undef for each directory entry, junction or otherwise. Anyway, I cannot compile the Win32::Symlink module - MS's cl.exe complains about the identifier W2AHELPER which I cannot find in any of the headers which VC++ express installed.

        Looks promising although I'm not sure that a junction is the same as a symlink.

        The module doesn't specifically specify that it uses junctions to create symbolic links, but it's the only kind of symbolic link that's supported by NTFS as far as I know.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://920732]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found