public static final String getGroup ( Path file ) throws IOException { if ( supports ( "posix" ) ) { PosixFileAttributeView view = Files . getFileAttributeView ( file , PosixFileAttributeView . class ) ; PosixFileAttributes attrs = view . readAttributes ( ) ; GroupPrincipal group = attrs . group ( ) ; return group . getName ( ) ; } else { JavaLogging . getLogger ( PosixHelp . class ) . warning ( "no posix support. getGroup(%s) returns \"\"" , file ) ; return "" ; } }
Return linux file group name . Or