Example #1
0
        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);
        }
Example #2
0
 internal AbsoluteDirectoryPath(DirectoryName name, AbsoluteDirectoryPath basePath = null)
 {
     Name = name;
     ContainingDirectory = basePath;
 }
Example #3
0
 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;
 }