@Override public FileStatus[] listStatus(Path f) throws AccessControlException, FileNotFoundException, IOException { checkPathIsSlash(f); FileStatus[] result = new FileStatus[theInternalDir.children.size()]; int i = 0; for (Entry<String, INode<FileSystem>> iEntry : theInternalDir.children.entrySet()) { INode<FileSystem> inode = iEntry.getValue(); if (inode instanceof INodeLink ) { INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode; result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], link.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } } return result; }
@Override public FileStatus[] listStatus(final Path f) throws AccessControlException, IOException { checkPathIsSlash(f); FileStatus[] result = new FileStatus[theInternalDir.children.size()]; int i = 0; for (Entry<String, INode<AbstractFileSystem>> iEntry : theInternalDir.children.entrySet()) { INode<AbstractFileSystem> inode = iEntry.getValue(); if (inode instanceof INodeLink ) { INodeLink<AbstractFileSystem> link = (INodeLink<AbstractFileSystem>) inode; result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], link.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } } return result; }
@Override public FileStatus getFileLinkStatus(final Path f) throws FileNotFoundException { // look up i internalDirs children - ignore first Slash INode<AbstractFileSystem> inode = theInternalDir.children.get(f.toUri().toString().substring(1)); if (inode == null) { throw new FileNotFoundException( "viewFs internal mount table - missing entry:" + f); } FileStatus result; if (inode instanceof INodeLink) { INodeLink<AbstractFileSystem> inodelink = (INodeLink<AbstractFileSystem>) inode; result = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], inodelink.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } return result; }
@Override public FileStatus[] listStatus(Path f) throws AccessControlException, FileNotFoundException, IOException { checkPathIsSlash(f); FileStatus[] result = new FileStatus[theInternalDir.children.size()]; int i = 0; for (Entry<String, INode<FileSystem>> iEntry : theInternalDir.children.entrySet()) { INode<FileSystem> inode = iEntry.getValue(); if (inode instanceof INodeLink ) { INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode; result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], link.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } } return result; }
@Override public FileStatus getFileLinkStatus(final Path f) throws FileNotFoundException { // look up i internalDirs children - ignore first Slash INode<AbstractFileSystem> inode = theInternalDir.children.get(f.toUri().toString().substring(1)); if (inode == null) { throw new FileNotFoundException( "viewFs internal mount table - missing entry:" + f); } FileStatus result; if (inode instanceof INodeLink) { INodeLink<AbstractFileSystem> inodelink = (INodeLink<AbstractFileSystem>) inode; result = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], inodelink.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } return result; }
@Override public FileStatus[] listStatus(final Path f) throws AccessControlException, IOException { checkPathIsSlash(f); FileStatus[] result = new FileStatus[theInternalDir.children.size()]; int i = 0; for (Entry<String, INode<AbstractFileSystem>> iEntry : theInternalDir.children.entrySet()) { INode<AbstractFileSystem> inode = iEntry.getValue(); if (inode instanceof INodeLink ) { INodeLink<AbstractFileSystem> link = (INodeLink<AbstractFileSystem>) inode; result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], link.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } } return result; }
@Override public FileStatus getFileLinkStatus(final Path f) throws IOException { // look up i internalDirs children - ignore first Slash INode<AbstractFileSystem> inode = theInternalDir.children.get(f.toUri().toString().substring(1)); if (inode == null) { throw new FileNotFoundException( "viewFs internal mount table - missing entry:" + f); } FileStatus result; if (inode instanceof INodeLink) { INodeLink<AbstractFileSystem> inodelink = (INodeLink<AbstractFileSystem>) inode; result = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(), inodelink.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(), new Path(inode.fullPath).makeQualified( myUri, null)); } return result; }
@Override public FileStatus[] listStatus(final Path f) throws AccessControlException, IOException { checkPathIsSlash(f); FileStatus[] result = new FileStatus[theInternalDir.children.size()]; int i = 0; for (Entry<String, INode<AbstractFileSystem>> iEntry : theInternalDir.children.entrySet()) { INode<AbstractFileSystem> inode = iEntry.getValue(); if (inode instanceof INodeLink ) { INodeLink<AbstractFileSystem> link = (INodeLink<AbstractFileSystem>) inode; result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(), link.getTargetLink(), new Path(inode.fullPath).makeQualified( myUri, null)); } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getGroupNames()[0], new Path(inode.fullPath).makeQualified( myUri, null)); } } return result; }