code: public static final Path create(Path path, Path target, String perms) throws IOException
      {
          FileAttribute<?>[] attrs = getFileAttributes(perms);
          switch (perms.charAt(0))
          {
              case '-':
                  return Files.createFile(path, attrs);
              case 'l':
                  if (target == null)
                  {
                      throw new IllegalArgumentException("no target");
                  }
                  return Files.createSymbolicLink(path, target, attrs);
              case 'd':
                  return Files.createDirectories(path, attrs);
              default:
                  throw new IllegalArgumentException(perms+" illegal to this method");
          }
      }
docs: Creates regular file, directory or symbolic link
  @param path
  @param target Can be null
  @param perms E.g. -rwxr--r--
  @return
  @throws IOException