Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ディレクトリを指す絶対ローカルパスがあります:"file:\\C:\\Users\\john\\documents\\visual studio 2010\\Projects\\proj"
"file:\\C:\\Users\\john\\documents\\visual studio 2010\\Projects\\proj"
しかし、それをDirectoryInfoctor に投げようとすると、「URI 形式はサポートされていません」という例外が発生します。
DirectoryInfo
私はグーグルでSOを調べましたが、ローカルパスではなく、リモートパスを持つソリューションしか表示されません。私はある種の変換方法を期待しています...
string uriPath = "file:\\C:\\Users\\john\\documents\\visual studio 2010\\Projects\\proj"; string localPath = new Uri(uriPath).LocalPath;