Creates a new instance with the specified {@code path} and {@code query}, without any path parameters.
166899
public static PathMappingResult of(String path, @Nullable String query) {
        return of(path, query, ImmutableMap.of());
    }
1166789
static PathFileObject createSimplePathFileObject(JavacPathFileManager fileManager,
            final Path path) {
        return new PathFileObject(fileManager, path) {
            @Override
            String inferBinaryName(Iterable<? extends Path> paths) {
                Path absPath = path.toAbsolutePath();
                for (Path p: paths) {
                    Path ap = p.toAbsolutePath();
                    if (absPath.startsWith(ap)) {
                        try {
                            Path rp = ap.relativize(absPath);
                            if (rp != null) // maybe null if absPath same as ap
                                return toBinaryName(rp);
                        } catch (IllegalArgumentException e) {
                            // ignore this p if cannot relativize path to p
                        }
                    }
                }
                return null;
            }
        };
    }
1121960
public static InputStream newInputStream(String path) throws IOException
    {
        if (IOAdapter == null) return new FileInputStream(path);
        return IOAdapter.open(path);
    }
1064868
@Nonnull
  public File createDestinationFileForPath(@Nonnull final String path) {
    assertNotNull("Path is null", path);

    if (path.isEmpty()) {
      throw makeException("File name is empty", null);
    }

    return new File(this.getTarget(), path);
  }
3760
public static ClassFileReader newInstance(Path path) throws IOException {
        if (!Files.exists(path)) {
            throw new FileNotFoundException(path.toString());
        }

        if (Files.isDirectory(path)) {
            return new DirectoryReader(path);
        } else if (path.getFileName().toString().endsWith(".jar")) {
            return new JarFileReader(path);
        } else {
            return new ClassFileReader(path);
        }
    }
318390
public Entry createFolder(String path) {
        OAuthRequest request = new OAuthRequest(Verb.GET, FILE_OPS_CREATE_FOLDER_URL);
        request.addQuerystringParameter("root", "dropbox");
        request.addQuerystringParameter("path", encode(path));

        service.signRequest(accessToken, request);
        String content = checkCreateFolder(request.send()).getBody();

        return Json.parse(content, Entry.class);
    }
331508
public DbxEntry./*@Nullable*/Folder createFolder(String path)
        throws DbxException
    {
        DbxPathV1.checkArgNonRoot("path", path);

        String[] params = {
            "root", "auto",
            "path", path,
        };

        return doPost(host.getApi(), "1/fileops/create_folder", params, null, new DbxRequestUtil.ResponseHandler<DbxEntry./*@Nullable*/Folder>() {
            @Override
            public DbxEntry./*@Nullable*/Folder handle(HttpRequestor.Response response)
                throws DbxException
            {
                if (response.getStatusCode() == 403) return null;
                if (response.getStatusCode() != 200) throw DbxRequestUtil.unexpectedStatus(response);
                return DbxRequestUtil.readJsonFromResponse(DbxEntry.Folder.Reader, response);
            }
        });
    }
719380
public String buildUrl(String path, List<Pair> queryParams, List<Pair> collectionQueryParams) {
        final StringBuilder url = new StringBuilder();
        url.append(basePath).append(path);

        if (queryParams != null && !queryParams.isEmpty()) {
            // support (constant) query string in `path`, e.g. "/posts?draft=1"
            String prefix = path.contains("?") ? "&" : "?";
            for (Pair param : queryParams) {
                if (param.getValue() != null) {
                    if (prefix != null) {
                        url.append(prefix);
                        prefix = null;
                    } else {
                        url.append("&");
                    }
                    String value = parameterToString(param.getValue());
                    url.append(escapeString(param.getName())).append("=").append(escapeString(value));
                }
            }
        }

        if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
            String prefix = url.toString().contains("?") ? "&" : "?";
            for (Pair param : collectionQueryParams) {
                if (param.getValue() != null) {
                    if (prefix != null) {
                        url.append(prefix);
                        prefix = null;
                    } else {
                        url.append("&");
                    }
                    String value = parameterToString(param.getValue());
                    // collection query parameter value already escaped as part of parameterToPairs
                    url.append(escapeString(param.getName())).append("=").append(value);
                }
            }
        }

        return url.toString();
    }
382873
public static File file(String path) {
		if (StrUtil.isBlank(path)) {
			throw new NullPointerException("File path is blank!");
		}
		return new File(getAbsolutePath(path));
	}
118051
public <A> A createAliasForProperty(Class<A> cl, Expression<?> path) {
        return createProxy(cl, path);
    }
1134951
public WritableByteChannel create(URI path, CreateFileOptions options) throws IOException {
    logger.atFine().log("create(%s)", path);
    Preconditions.checkNotNull(path, "path could not be null");
    if (FileInfo.isDirectoryPath(path)) {
      throw new IOException(
          String.format("Cannot create a file whose name looks like a directory. Got '%s'", path));
    }

    // Check if a directory of that name exists.
    if (options.checkNoDirectoryConflict()) {
      URI dirPath = FileInfo.convertToDirectoryPath(pathCodec, path);
      if (exists(dirPath)) {
        throw new FileAlreadyExistsException("A directory with that name exists: " + path);
      }
    }

    // Ensure that parent directories exist.
    if (options.ensureParentDirectoriesExist()) {
      URI parentPath = getParentPath(path);
      if (parentPath != null) {
        mkdirs(parentPath);
      }
    }

    return createInternal(path, options);
  }
1144205
public static AiffData create(URL path) {
		try {
			return create(
				AudioSystem.getAudioInputStream(
					new BufferedInputStream(path.openStream())));
		} catch (Exception e) {
			org.lwjgl.LWJGLUtil.log("Unable to create from: " + path);
			e.printStackTrace();
			return null;
		}		
	}
479512
public static BufferedWriter newBufferedWriter(String path) throws IOException
    {
        return new BufferedWriter(new OutputStreamWriter(IOUtil.newOutputStream(path), "UTF-8"));
    }
749992
public Create create(String path, String data) {
        Create command = new Create();
        command.path(path);
        command.data(data);
        command.mode(DEFAULT_MODE);
        command.acl(DEFAULT_ACL);
        action.setCommand(command);
        return command;
    }
767982
protected String create(String path, byte[] data) {
        try {
            return getClient().create().creatingParentsIfNeeded().forPath(path, data);
        } catch (Exception e) {
            throw new NiubiException(e);
        }
    }
416692
public UrlBuilder withQuery(String query) {
        if (query == null || query.isEmpty()) {
            this.query.clear();
        } else {
            with(query, UrlTokenizerState.QUERY);
        }
        return this;
    }
249679
@SuppressWarnings("unchecked")
    protected <K, V, E extends SimpleExpression<? super V>> MapPath<K, V, E> createMap(String property, Class<? super K> key, Class<? super V> value, Class<? super E> queryType) {
        return add(new MapPath<K, V, E>(key, value, (Class) queryType, forProperty(property)));
    }