public static final char getFileTypeLetter ( Path path ) { if ( Files . isRegularFile ( path ) ) { return ' ' ; } if ( Files . isDirectory ( path ) ) { return ' ' ; } if ( Files . isSymbolicLink ( path ) ) { return ' ' ; } throw new IllegalArgumentException ( path + " is either regular file, directory or symbolic link" ) ; }
Returns - for regular file d for directory or l for symbolic link .