private static Map < Tag , String > createTags ( String ufsName , UfsStatus status ) { Map < Tag , String > tagMap = new HashMap <> ( ) ; tagMap . put ( Tag . UFS , ufsName ) ; tagMap . put ( Tag . OWNER , status . getOwner ( ) ) ; tagMap . put ( Tag . GROUP , status . getGroup ( ) ) ; tagMap . put ( Tag . MODE , String . valueOf ( status . getMode ( ) ) ) ; if ( status instanceof UfsFileStatus ) { tagMap . put ( Tag . TYPE , Type . FILE . name ( ) ) ; tagMap . put ( Tag . CONTENT_HASH , ( ( UfsFileStatus ) status ) . getContentHash ( ) ) ; } else { tagMap . put ( Tag . TYPE , Type . DIRECTORY . name ( ) ) ; } return tagMap ; }
Parses the input status and returns a tag map .