static void CreateNew(this IFileSystem fileSystem, AbsoluteDirectoryPath path) { var tempDirectory = path.ContainingDirectory / DirectoryName.GetRandomDirectoryName(); Directory.CreateDirectory(tempDirectory.NativePath); fileSystem.Create(path.ContainingDirectory); fileSystem.Move(tempDirectory, path); }
internal AbsoluteDirectoryPath(DirectoryName name, AbsoluteDirectoryPath basePath = null) { Name = name; ContainingDirectory = basePath; }
public static DirectoryName CreateNumberName(DirectoryName original, int number) { return(original.Add(number.ToString(CultureInfo.InvariantCulture))); }
internal RelativeDirectoryPath(DirectoryName name, RelativeDirectoryPath basePath = null) { BasePath = basePath; Name = name; }