Detecting if path is on a windows mapped network drive

余生颓废 提交于 2019-12-10 16:05:39

问题


Is there a simple way to tell if a given path lives on a mapped network drive? Or to tell if a given drive is a mapped network drive?

I hoped they would have a reparse point attribute but GetFileAttributes() returns nothing but a directory flag.


回答1:


GetDriveType is one option.




回答2:


Did you try GetFileAttributesEx() with GetFileExMaxInfoLevel ?



来源:https://stackoverflow.com/questions/3517175/detecting-if-path-is-on-a-windows-mapped-network-drive

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