Unique Folder Identifier

余生长醉 提交于 2019-12-17 16:53:29

问题


Earlier today someone generously answered my question regarding the retrieval of a unique identifier associated with files on the computer. Unique File Identifier

The solution worked great, however, it does not address unique identifiers for folders. How can I retrieve a UID for specified directories, UID's that will stay with the directory through renames and moves.

Update: FSCTL_GET_OBJECT_ID seems like it is the function I am after, but would someone be able to provide brief context on the usage? Thanks!


回答1:


I put this into an answer, because it was too much text for a comment.

I answered your question regarding Unique File Identifiers. I didn't dig in too deep into this topic. That's been just good researching skills.

I researched a bit and collected some documentation links that may help you:

  • Local File Systems
  • CSIDL
  • KNOWNFOLDERID
  • Known Folders

I've been searching for quite a time, but I couldn't find anything which identifies each folder, regardless of its path.

The only folders, which always can be identified - as far as I know, yet - are these known folders. That's because one WinOS uses the C:/winnt/Windows Net/ and another one uses D:/Windows/Net/ path (don't look up those, I just made them up off the top of my head).



来源:https://stackoverflow.com/questions/10132686/unique-folder-identifier

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!