Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1141,7 +1141,10 @@ final class NetFileSystemProvider extends AbstractFileSystemProvider
if (false) throw new cli.System.IO.FileNotFoundException();
if (false) throw new cli.System.IO.IOException();
FileInfo info = new FileInfo(path);
if (!info.get_Exists())
// We have to rely on the (undocumented) fact that FileInfo.Attributes returns -1
// when the path does not exist. We need this to work for both files and directories
// and this is the only efficient way to do that.
if (info.get_Attributes().Value == -1)
{
throw new NoSuchFileException(path);
}