Lines Matching refs:file

8  * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
52 * external program file to be invoked and its arguments, if any.
152 * to be appended to a log file:
167 * assert pb.redirectOutput().file() == log;
447 * <li>a redirection to read from a file, created by an invocation of
449 * <li>a redirection to write to a file, created by an invocation of
451 * <li>a redirection to append to a file, created by an invocation of
508 * Redirect.PIPE.file() == null &&
523 * Redirect.INHERIT.file() == null &&
533 * with this redirect, or {@code null} if there is no such file.
535 * @return the file associated with this redirect,
536 * or {@code null} if there is no such file
538 public File file() { return null; }
541 * When redirected to a destination file, indicates if the output
542 * is to be written to the end of the file.
549 * Returns a redirect to read from the specified file.
553 * Redirect.from(file).file() == file &&
554 * Redirect.from(file).type() == Redirect.Type.READ
557 * @throws NullPointerException if the specified file is null
558 * @return a redirect to read from the specified file
560 public static Redirect from(final File file) {
561 if (file == null)
565 public File file() { return file; }
567 return "redirect to read from file \"" + file + "\"";
573 * Returns a redirect to write to the specified file.
574 * If the specified file exists when the subprocess is started,
579 * Redirect.to(file).file() == file &&
580 * Redirect.to(file).type() == Redirect.Type.WRITE
583 * @throws NullPointerException if the specified file is null
584 * @return a redirect to write to the specified file
586 public static Redirect to(final File file) {
587 if (file == null)
591 public File file() { return file; }
593 return "redirect to write to file \"" + file + "\"";
600 * Returns a redirect to append to the specified file.
602 * end of the file and then writes the requested data.
609 * Redirect.appendTo(file).file() == file &&
610 * Redirect.appendTo(file).type() == Redirect.Type.APPEND
613 * @throws NullPointerException if the specified file is null
614 * @return a redirect to append to the specified file
616 public static Redirect appendTo(final File file) {
617 if (file == null)
621 public File file() { return file; }
623 return "redirect to append to file \"" + file + "\"";
644 assert this.file() != null;
645 return this.file().equals(r.file());
653 File file = file();
654 if (file == null)
657 return file.hashCode();
772 * Sets this process builder's standard input source to a file.
775 * {@code redirectInput(file)}
778 * {@code (Redirect.from(file))}.
780 * @param file the new standard input source
784 public ProcessBuilder redirectInput(File file) {
785 return redirectInput(Redirect.from(file));
789 * Sets this process builder's standard output destination to a file.
792 * {@code redirectOutput(file)}
795 * {@code (Redirect.to(file))}.
797 * @param file the new standard output destination
801 public ProcessBuilder redirectOutput(File file) {
802 return redirectOutput(Redirect.to(file));
806 * Sets this process builder's standard error destination to a file.
809 * {@code redirectError(file)}
812 * {@code (Redirect.to(file))}.
814 * @param file the new standard error destination
818 public ProcessBuilder redirectError(File file) {
819 return redirectError(Redirect.to(file));
955 * <li>The operating system program file was not found.
956 * <li>Access to the program file was denied.
984 * {@linkplain #redirectInput redirected from a file}
987 * denies read access to the file, or
991 * {@linkplain #redirectOutput redirected to a file}
994 * denies write access to the file