I'm using Windows 7 and I'm trying to list all the files in MyDocu开发者_运维技巧ments. I get the path with Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) which is c:/Users/eyalw/Documents
Now I try to list the files with DirectoryInfo.GetFileSystemInfos(), and i get files that are inside the dir + directories from my user home, like My Music, My Pictures, My Videos.
i checked with the command line 'dir', and those dirs are not inside eyalw/Documents so why the hack do i get them?
thanks in advance!
If you look at the Attributes
property, you;ll see that these are hidden symlinks (or ReparsePoint
s) to C:\Users\eyalw\Music
, etc.
Windows Vista and Windows 7 create these hidden symlinks in case a program tries to write to My Documents\My Pictures
, etc, which existed in Windows XP.
精彩评论