throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path));
}
- public void Create() => FileSystem.CreateDirectory(FullPath);
+ public void Create()
+ {
+ FileSystem.CreateDirectory(FullPath);
+ Invalidate();
+ }
// Returns an array of Files in the DirectoryInfo specified by path
public FileInfo[] GetFiles() => GetFiles("*", enumerationOptions: EnumerationOptions.Compatible);
DirectoryInfo testInfo = new DirectoryInfo(testDir + extension + trailing);
Assert.Equal(trailing, testInfo.Extension);
}
+
+ [Fact]
+ public void CreateDirectoryWithAttributes()
+ {
+ string testDir = Path.Combine(GetTestFilePath(), "CreateDirectoryWithAttributes");
+ DirectoryInfo testInfo = new DirectoryInfo(testDir);
+ testInfo.Create();
+ testInfo.Attributes = FileAttributes.Directory | FileAttributes.Normal;
+ }
}
}