Wednesday 15 June 2011

c# - How to detect recursively linked directories? -


Looking at this scenario: I have a Windows client connected to the SMB share. I want to do something with files repeatedly to direct directories in that part (if there is a certain size increase, then imagine for calculating Shaw 1 hash).

What I would normally do: recurring dirInfo. Unauthorized directories () to capture unauthorized access and queue files to some extraordinary cases such as operator threads (such as to call sha1).

Challenge: Recursive Simlinks My testing center is quite simple

  me @ smb: ~ $ ls -l / home / me / tmp / recursion starter here lrwxrwxrwx recursion - Gt; / Home / me / tmp / recursionStartsHere   

What I've tried (different from Googlin) using dirInfo.Attributes.HasFlag (FlagAttributes.ReparsePoint) For the symlink that is (of course) does not work out force force approach Every one directory looks like indexing with its stored checksum - which can not be confrontational.

As I am out of practical thoughts now, How can I say that some directory (only) is a symlink? Of course, I would prefer a platform independent, so that my code works with remote SMB as well as on local NTFS drives.

An interesting blog entry by Troy is:

Although I do not know whether it is working or not, with SMB shares.

No comments:

Post a Comment