static FileStatus createFileStatus ( String path , INode node ) { // length is zero for directories return new FileStatus ( node . isDirectory ( ) ? 0 : node . computeContentSummary ( ) . getLength ( ) , node . isDirectory ( ) , node . isDirectory ( ) ? 0 : ( ( INodeFile ) node ) . getReplication ( ) , node . isDirectory ( ) ? 0 : ( ( INodeFile ) node ) . getPreferredBlockSize ( ) , node . getModificationTime ( ) , node . getAccessTime ( ) , node . getFsPermission ( ) , node . getUserName ( ) , node . getGroupName ( ) , new Path ( path ) ) ; }
Create FileStatus by file INode