Ejemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        public override FileStatus GetFileLinkStatus(Path f)
        {
            FileStatus status = fsImpl.GetFileLinkStatus(f);

            // FileSystem#getFileLinkStatus qualifies the link target
            // AbstractFileSystem needs to return it plain since it's qualified
            // in FileContext, so re-get and set the plain target
            if (status.IsSymlink())
            {
                status.SetSymlink(fsImpl.GetLinkTarget(f));
            }
            return(status);
        }
Ejemplo n.º 2
0
        /// <summary>Return a FileStatus representing the given path.</summary>
        /// <remarks>
        /// Return a FileStatus representing the given path. If the path refers
        /// to a symlink return a FileStatus representing the link rather than
        /// the object the link refers to.
        /// </remarks>
        /// <exception cref="System.IO.IOException"/>
        public override FileStatus GetFileLinkStatus(Path f)
        {
            FileStatus fi = GetFileLinkStatusInternal(f, false);

            // getFileLinkStatus is supposed to return a symlink with a
            // qualified path
            if (fi.IsSymlink())
            {
                Path targetQual = FSLinkResolver.QualifySymlinkTarget(this.GetUri(), fi.GetPath()
                                                                      , fi.GetSymlink());
                fi.SetSymlink(targetQual);
            }
            return(fi);
        }