开发者

List MyDocuments Directory Files strange output

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 ReparsePoints) 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜