Lines Matching refs:pathname

43  * <p> User interfaces and operating systems use system-dependent <em>pathname
46 * <em>abstract pathname</em> has two components:
51 * directory, or <code>"\\\\"</code>&nbsp;for a Microsoft Windows UNC pathname, and
55 * The first name in an abstract pathname may be a directory name or, in the
57 * in an abstract pathname denotes a directory; the last name may denote
58 * either a directory or a file. The <em>empty</em> abstract pathname has no
61 * <p> The conversion of a pathname string to or from an abstract pathname is
62 * inherently system-dependent. When an abstract pathname is converted into a
63 * pathname string, each name is separated from the next by a single copy of
68 * When a pathname string is converted into an abstract pathname, the names
72 * <p> A pathname, whether abstract or in string form, may be either
73 * <em>absolute</em> or <em>relative</em>. An absolute pathname is complete in
75 * denotes. A relative pathname, in contrast, must be interpreted in terms of
76 * information taken from some other pathname. By default the classes in the
82 * <p> The <em>parent</em> of an abstract pathname may be obtained by invoking
83 * the {@link #getParent} method of this class and consists of the pathname's
84 * prefix and each name in the pathname's name sequence except for the last.
85 * Each directory's absolute pathname is an ancestor of any <tt>File</tt>
86 * object with an absolute abstract pathname which begins with the directory's
87 * absolute pathname. For example, the directory denoted by the abstract
88 * pathname <tt>"/usr"</tt> is an ancestor of the directory denoted by the
89 * pathname <tt>"/usr/local/bin"</tt>.
97 * <li> For UNIX platforms, the prefix of an absolute pathname is always
98 * <code>"/"</code>. Relative pathnames have no prefix. The abstract pathname
102 * <li> For Microsoft Windows platforms, the prefix of a pathname that contains a drive
104 * possibly followed by <code>"\\"</code> if the pathname is absolute. The
105 * prefix of a UNC pathname is <code>"\\\\"</code>; the hostname and the share
106 * name are the first two names in the name sequence. A relative pathname that
118 * form of this pathname.
129 * created, the abstract pathname represented by a <code>File</code> object
159 * This abstract pathname's normalized pathname string. A normalized
160 * pathname string uses the default name-separator character and does not
194 * The length of this abstract pathname's prefix, or zero if it has no
200 * Returns the length of this abstract pathname's prefix.
247 * Internal constructor for already-normalized pathname strings.
249 private File(String pathname, int prefixLength) {
250 this.path = pathname;
255 * Internal constructor for already-normalized pathname strings.
268 * pathname string into an abstract pathname. If the given string is
269 * the empty string, then the result is the empty abstract pathname.
271 * @param pathname A pathname string
273 * If the <code>pathname</code> argument is <code>null</code>
275 public File(String pathname) {
276 if (pathname == null) {
279 this.path = fs.normalize(pathname);
284 parent abstract pathname as the current user directory. An empty parent
291 * Creates a new <code>File</code> instance from a parent pathname string
292 * and a child pathname string.
297 * <code>child</code> pathname string.
299 * <p> Otherwise the <code>parent</code> pathname string is taken to denote
300 * a directory, and the <code>child</code> pathname string is taken to
301 * denote either a directory or a file. If the <code>child</code> pathname
302 * string is absolute then it is converted into a relative pathname in a
305 * <code>child</code> into an abstract pathname and resolving the result
306 * against a system-dependent default directory. Otherwise each pathname
307 * string is converted into an abstract pathname and the child abstract
308 * pathname is resolved against the parent.
310 * @param parent The parent pathname string
311 * @param child The child pathname string
335 * pathname and a child pathname string.
340 * <code>child</code> pathname string.
342 * <p> Otherwise the <code>parent</code> abstract pathname is taken to
343 * denote a directory, and the <code>child</code> pathname string is taken
345 * pathname string is absolute then it is converted into a relative
346 * pathname in a system-dependent way. If <code>parent</code> is the empty
347 * abstract pathname then the new <code>File</code> instance is created by
348 * converting <code>child</code> into an abstract pathname and resolving
350 * pathname string is converted into an abstract pathname and the child
351 * abstract pathname is resolved against the parent.
353 * @param parent The parent abstract pathname
354 * @param child The child pathname string
378 * <tt>file:</tt> URI into an abstract pathname.
384 * <p> For a given abstract pathname <i>f</i> it is guaranteed that
390 * so long as the original abstract pathname, the URI, and the new abstract
391 * pathname are all created in (possibly different invocations of) the same
394 * on one operating system is converted into an abstract pathname in a
445 * pathname. This is just the last name in the pathname's name
446 * sequence. If the pathname's name sequence is empty, then the empty
450 * pathname, or the empty string if this pathname's name sequence
460 * Returns the pathname string of this abstract pathname's parent, or
461 * <code>null</code> if this pathname does not name a parent directory.
463 * <p> The <em>parent</em> of an abstract pathname consists of the
464 * pathname's prefix, if any, and each name in the pathname's name
466 * the pathname does not name a parent directory.
468 * @return The pathname string of the parent directory named by this
469 * abstract pathname, or <code>null</code> if this pathname
483 * Returns the abstract pathname of this abstract pathname's parent,
484 * or <code>null</code> if this pathname does not name a parent
487 * <p> The <em>parent</em> of an abstract pathname consists of the
488 * pathname's prefix, if any, and each name in the pathname's name
490 * the pathname does not name a parent directory.
492 * @return The abstract pathname of the parent directory named by this
493 * abstract pathname, or <code>null</code> if this pathname
505 * Converts this abstract pathname into a pathname string. The resulting
509 * @return The string form of this abstract pathname
519 * Tests whether this abstract pathname is absolute. The definition of
520 * absolute pathname is system dependent. On UNIX systems, a pathname is
522 * pathname is absolute if its prefix is a drive specifier followed by
525 * @return <code>true</code> if this abstract pathname is absolute,
533 * Returns the absolute pathname string of this abstract pathname.
535 * <p> If this abstract pathname is already absolute, then the pathname
537 * method. If this abstract pathname is the empty abstract pathname then
538 * the pathname string of the current user directory, which is named by the
540 * pathname is resolved in a system-dependent way. On UNIX systems, a
541 * relative pathname is made absolute by resolving it against the current
542 * user directory. On Microsoft Windows systems, a relative pathname is made absolute
544 * pathname, if any; if not, it is resolved against the current user
547 * @return The absolute pathname string denoting the same file or
548 * directory as this abstract pathname
560 * Returns the absolute form of this abstract pathname. Equivalent to
563 * @return The absolute abstract pathname denoting the same file or
564 * directory as this abstract pathname
577 * Returns the canonical pathname string of this abstract pathname.
579 * <p> A canonical pathname is both absolute and unique. The precise
581 * converts this pathname to absolute form if necessary, as if by invoking the
584 * such as <tt>"."</tt> and <tt>".."</tt> from the pathname, resolving
588 * <p> Every pathname that denotes an existing file or directory has a
589 * unique canonical form. Every pathname that denotes a nonexistent file
591 * the pathname of a nonexistent file or directory may be different from
592 * the canonical form of the same pathname after the file or directory is
593 * created. Similarly, the canonical form of the pathname of an existing
595 * pathname after the file or directory is deleted.
597 * @return The canonical pathname string denoting the same file or
598 * directory as this abstract pathname
602 * construction of the canonical pathname may require
622 * Returns the canonical form of this abstract pathname. Equivalent to
625 * @return The canonical pathname string denoting the same file or
626 * directory as this abstract pathname
630 * construction of the canonical pathname may require
659 * Converts this abstract pathname into a <code>file:</code> URL. The
661 * the file denoted by this abstract pathname is a directory, then the
677 * abstract pathname into a URL by first converting it into a URI, via the
690 * Constructs a <tt>file:</tt> URI that represents this abstract pathname.
693 * determined that the file denoted by this abstract pathname is a
696 * <p> For a given abstract pathname <i>f</i>, it is guaranteed that
702 * so long as the original abstract pathname, the URI, and the new abstract
703 * pathname are all created in (possibly different invocations of) the same
707 * system is converted into an abstract pathname in a virtual machine on a
710 * <p> Note that when this abstract pathname represents a UNC pathname then
716 * may be used to obtain a {@code Path} representing this abstract pathname.
719 * <tt>"file"</tt>, a path representing this abstract pathname,
746 * abstract pathname.
749 * abstract pathname exists <em>and</em> can be read by the
770 * abstract pathname.
773 * contains a file denoted by this abstract pathname <em>and</em>
794 * Tests whether the file or directory denoted by this abstract pathname
798 * by this abstract pathname exists; <code>false</code> otherwise
817 * Tests whether the file denoted by this abstract pathname is a
827 * abstract pathname exists <em>and</em> is a directory;
848 * Tests whether the file denoted by this abstract pathname is a normal
860 * abstract pathname exists <em>and</em> is a normal file;
880 * Tests whether the file named by this abstract pathname is a hidden
887 * abstract pathname is hidden according to the conventions of the
909 * Returns the time that the file denoted by this abstract pathname was
941 * Returns the length of the file denoted by this abstract pathname.
942 * The return value is unspecified if this pathname denotes a directory.
951 * pathname, or <code>0L</code> if the file does not exist. Some
975 * Atomically creates a new, empty file named by this abstract pathname if
1010 * Deletes the file or directory denoted by this abstract pathname. If
1011 * this pathname denotes a directory, then the directory must be empty in
1040 * pathname be deleted when the virtual machine terminates.
1078 * directory denoted by this abstract pathname.
1080 * <p> If this abstract pathname does not denote a directory, then this
1098 * directory denoted by this abstract pathname. The array will be
1100 * this abstract pathname does not denote a directory, or if an
1121 * directory denoted by this abstract pathname that satisfy the specified
1128 * of the filter is invoked on this abstract pathname and the name of a
1135 * directory denoted by this abstract pathname that were accepted
1138 * Returns {@code null} if this abstract pathname does not denote
1164 * directory denoted by this abstract pathname.
1166 * <p> If this abstract pathname does not denote a directory, then this
1170 * not included in the result. Each resulting abstract pathname is
1171 * constructed from this abstract pathname using the {@link #File(File,
1173 * pathname is absolute then each resulting pathname is absolute; if this
1174 * pathname is relative then each resulting pathname will be relative to
1188 * directories in the directory denoted by this abstract pathname.
1190 * {@code null} if this abstract pathname does not denote a
1213 * directories in the directory denoted by this abstract pathname that
1217 * is {@code null} then all pathnames are accepted. Otherwise, a pathname
1221 * invoked on this abstract pathname and the name of a file or directory in
1228 * directories in the directory denoted by this abstract pathname.
1230 * {@code null} if this abstract pathname does not denote a
1253 * directories in the directory denoted by this abstract pathname that
1257 * is {@code null} then all pathnames are accepted. Otherwise, a pathname
1260 * filter is invoked on the pathname.
1266 * directories in the directory denoted by this abstract pathname.
1268 * {@code null} if this abstract pathname does not denote a
1292 * Creates the directory named by this abstract pathname.
1314 * Creates the directory named by this abstract pathname, including any
1353 * Renames the file denoted by this abstract pathname.
1358 * might not succeed if a file with the destination abstract pathname
1366 * @param dest The new abstract pathname for the named file
1396 * abstract pathname.
1433 * Marks the file or directory named by this abstract pathname so that
1462 * pathname.
1481 * the access permissions of this abstract pathname.
1503 * pathname.
1517 * change the access permissions of this abstract pathname.
1532 * pathname.
1551 * change the access permissions of this abstract pathname. If
1576 * pathname.
1590 * change the access permissions of this abstract pathname. If
1608 * pathname.
1627 * change the access permissions of this abstract pathname. If
1652 * pathname.
1666 * change the access permissions of this abstract pathname. If
1684 * abstract pathname.
1686 * @return <code>true</code> if and only if the abstract pathname exists
1725 * that the canonical pathname of any file physically present on the local
1728 * <p> The canonical pathname of a file that resides on some other machine
1731 * pathname of a remote file is syntactically indistinguishable from the
1732 * pathname of a local file then it will begin with one of the roots
1761 * abstract pathname.
1764 * abstract pathname does not name a partition
1770 * read access to the file named by this abstract pathname
1800 * if the abstract pathname does not name a partition. This
1808 * read access to the file named by this abstract pathname
1826 * partition <a href="#partName">named</a> by this abstract pathname. When
1841 * if the abstract pathname does not name a partition. On
1849 * read access to the file named by this abstract pathname
1902 * <li> The file denoted by the returned abstract pathname did not exist
1905 * abstract pathname again in the current invocation of the virtual
1950 * @return An abstract pathname denoting a newly-created empty file
2013 * @return An abstract pathname denoting a newly-created empty file
2043 * @param pathname The abstract pathname to be compared to this abstract
2044 * pathname
2046 * @return Zero if the argument is equal to this abstract pathname, a
2047 * value less than zero if this abstract pathname is
2049 * than zero if this abstract pathname is lexicographically
2054 public int compareTo(File pathname) {
2055 return fs.compare(this, pathname);
2059 * Tests this abstract pathname for equality with the given object.
2061 * <code>null</code> and is an abstract pathname that denotes the same file
2062 * or directory as this abstract pathname. Whether or not two abstract
2067 * @param obj The object to be compared with this abstract pathname
2080 * Computes a hash code for this abstract pathname. Because equality of
2083 * pathname is equal to the exclusive <em>or</em> of the hash code
2084 * of its pathname string and the decimal value
2087 * its pathname string converted to lower case and the decimal
2089 * lowercasing the pathname string.
2091 * @return A hash code for this abstract pathname
2098 * Returns the pathname string of this abstract pathname. This is just the
2101 * @return The string form of this abstract pathname
2159 * <p> If this abstract pathname is the empty abstract pathname then this