Exemplo n.º 1
0
        public string GetFullPath(string path)
        {
            Guard.NotNull(path, nameof(path));

            AbsolutePath absolutePath = owner.ToAbsolutePath(path);

            return(absolutePath.GetText());
        }
Exemplo n.º 2
0
        public bool Exists(string path)
        {
            try
            {
                AbsolutePath absolutePath = string.IsNullOrWhiteSpace(path) ? null : owner.ToAbsolutePath(path);

                var handler   = new FileExistsHandler(root);
                var arguments = new DirectoryOrFileExistsArguments(absolutePath);

                return(handler.Handle(arguments));
            }
            catch (Exception ex) when(ShouldSuppress(ex))
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public IDirectoryInfo GetParent(string path)
        {
            Guard.NotNull(path, nameof(path));
            AssertPathIsNotWhiteSpace(path);

            AbsolutePath absolutePath = owner.ToAbsolutePath(path);

            AbsolutePath parentPath = absolutePath.TryGetParentPath();

            return(parentPath == null ? null : owner.ConstructDirectoryInfo(parentPath));
        }