public LocalDirectory(LocalFileSystem fs, string path, OpenDirectoryMode mode) { ParentFileSystem = fs; FullPath = path; LocalPath = fs.ResolveLocalPath(path); Mode = mode; DirInfo = new DirectoryInfo(LocalPath); }
public LocalDirectory(LocalFileSystem fs, string path, OpenDirectoryMode mode) { ParentFileSystem = fs; FullPath = path; LocalPath = fs.ResolveLocalPath(path); Mode = mode; try { DirInfo = new DirectoryInfo(LocalPath); } catch (Exception ex) when(ex is ArgumentNullException || ex is ArgumentException || ex is PathTooLongException) { ThrowHelper.ThrowResult(ResultFs.PathNotFound, ex); throw; } if (!DirInfo.Exists) { ThrowHelper.ThrowResult(ResultFs.PathNotFound); } }