fatkatie:
I don't know of any current perl modules or API that would let you work with junctions. If you can't use "dir /aL" to find the information you want, then try Googling "reparse_point", as it seems that Junctions are a specialization of Windows Reparse Points.
I did a little work with them a couple years ago, but didn't dig into it too deeply. If you're just wanting to detect whether a file is a reparse point, though, you should be able to do so with Inline::C. A little of the C code I used to detect reparse points is:
#include <windows.h>
#include <winbase.h>
int is_reparse_point(const char *file_name) {
WIN32_FIND_DATA file_data;
HANDLE fHandle = FindFirstFile(file_name, &file_data);
// If we can't open the file handle, we'll just say it's not a rep
+arse point
if (fHandle == INVALID_HANDLE_VALUE)
return 0;
// Convert the bit into a 0/1 value
return !!(fHandle.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+;
}
Note: I just trimmed this out of an old project, and I don't have the time right now to put it together into a simple perl module, but if you want to pursue this, ping me if you have any troubles, and I'll lend a hand.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|