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