예제 #1
0
        private DirectoryEntry CreateDirectories([NotNull] AbsolutePath absolutePath)
        {
            var arguments = new DirectoryCreateArguments(absolutePath, true);
            var handler   = new DirectoryCreateHandler(root);

            return(handler.Handle(arguments));
        }
예제 #2
0
        private DirectoryEntry CreateDirectories([NotNull] AbsolutePath absolutePath)
        {
            CreateVolume(absolutePath);

            var arguments = new DirectoryCreateArguments(absolutePath);
            var handler   = new DirectoryCreateHandler(container);

            return(handler.Handle(arguments));
        }
예제 #3
0
        public IDirectoryInfo CreateDirectory(string path)
        {
            Guard.NotNull(path, nameof(path));
            AssertPathIsNotWhiteSpace(path);

            AbsolutePath absolutePath = owner.ToAbsolutePath(path);

            var handler   = new DirectoryCreateHandler(root);
            var arguments = new DirectoryCreateArguments(absolutePath, false);

            handler.Handle(arguments);

            return(owner.ConstructDirectoryInfo(absolutePath));
        }
예제 #4
0
        public IDirectoryInfo CreateDirectory(string path)
        {
            Guard.NotNull(path, nameof(path));
            AssertPathIsNotWhiteSpace(path);

            AbsolutePath absolutePath = owner.ToAbsolutePath(path);

            var handler   = new DirectoryCreateHandler(container);
            var arguments = new DirectoryCreateArguments(absolutePath);

            handler.Handle(arguments);

            string displayPath = absolutePath.HasTrailingSeparator ? string.Empty : absolutePath.Components.Last();

            return(owner.ConstructDirectoryInfo(absolutePath, displayPath));
        }