Source:
public FileStatus[] listStatus(final Path f) throws IOException { checkPathIsSlash(f); FileStatus[] fallbackStatuses = listStatusForFallbackLink(); FileStatus[] result = new FileStatus[theInternalDir.getChildren().size()]; int i = 0; for (Entry<String, INode<AbstractFileSystem>> iEntry : theInternalDir.getChildren().entrySet()) { INode<AbstractFileSystem> inode = iEntry.getValue(); Path path = new Path(inode.fullPath).makeQualified(myUri, null); if (inode.isLink()) { INodeLink<AbstractFileSystem> link = (INodeLink<AbstractFileSystem>) inode; if (showMountLinksAsSymlinks) { result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(), link.getTargetLink(), path); continue; } String linkedPath = link.getTargetFileSystem().getUri().getPath(); if ("".equals(linkedPath)) { linkedPath = "/"; } try { FileStatus status = ((ChRootedFs) link.getTargetFileSystem()).getMyFs() .getFileStatus(new Path(linkedPath)); result[i++] = new FileStatus(status.getLen(), status.isDirectory(), status.getReplication(), status.getBlockSize(), status.getModificationTime(), status.getAccessTime(), status.getPermission(), status.getOwner(), status.getGroup(), null, path); } catch (FileNotFoundException ex) { LOG.warn("Cannot get one of the children's(" + path + ") target path(" + link.getTargetFileSystem().getUri() + ") file status.", ex); throw ex; } } 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)); } } if (fallbackStatuses.length > 0) { return consolidateFileStatuses(fallbackStatuses, result); } else { return result; } }

Target:
public FileStatus[] listStatus(final Path f) throws IOException { checkPathIsSlash(f); FileStatus[] fallbackStatuses = listStatusForFallbackLink(); FileStatus[] result = new FileStatus[theInternalDir.getChildren().size()]; int i = 0; for (Entry<String, INode<AbstractFileSystem>> iEntry : theInternalDir.getChildren().entrySet()) { INode<AbstractFileSystem> inode = iEntry.getValue(); Path path = new Path(inode.fullPath).makeQualified(myUri, null); if (inode.isLink()) { INodeLink<AbstractFileSystem> link = (INodeLink<AbstractFileSystem>) inode; if (showMountLinksAsSymlinks) { result[i++] = new FileStatus(0, false, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(), link.getTargetLink(), path); continue; } String linkedPath = link.getTargetFileSystem().getUri().getPath(); if ("".equals(linkedPath)) { linkedPath = "/"; } try { FileStatus status = ((ChRootedFs) link.getTargetFileSystem()).getMyFs() .getFileStatus(new Path(linkedPath)); result[i++] = new FileStatus(status.getLen(), status.isDirectory(), status.getReplication(), status.getBlockSize(), status.getModificationTime(), status.getAccessTime(), status.getPermission(), status.getOwner(), status.getGroup(), null, path); } catch (FileNotFoundException ex) { LOG.warn("Cannot get one of the children's(" + path + ") target path(" + link.getTargetFileSystem().getUri() + ") file status.", ex); throw ex; } } else { result[i++] = new FileStatus(0, true, 0, 0, creationTime, creationTime, PERMISSION_555, ugi.getShortUserName(), ugi.getGroupNames()[0], path); } } if (fallbackStatuses.length > 0) { return consolidateFileStatuses(fallbackStatuses, result); } else { return result; } }