Lines Matching defs:File

85  * Each directory's absolute pathname is an ancestor of any <tt>File</tt>
128 * <p> Instances of the <code>File</code> class are immutable; that is, once
129 * created, the abstract pathname represented by a <code>File</code> object
137 * many of the limitations of the {@code java.io.File} class.
139 * Path} that uses the abstract path represented by a {@code File} object to
149 public class File
150 implements Serializable, Comparable<File>
249 private File(String pathname, int prefixLength) {
257 * public(File, String) constructor.
259 private File(String child, File parent) {
267 * Creates a new <code>File</code> instance by converting the given
275 public File(String pathname) {
283 /* Note: The two-argument File constructors do not interpret an empty
291 * Creates a new <code>File</code> instance from a parent pathname string
295 * <code>File</code> instance is created as if by invoking the
296 * single-argument <code>File</code> constructor on the given
304 * the new <code>File</code> instance is created by converting
315 public File(String parent, String child) {
334 * Creates a new <code>File</code> instance from a parent abstract
338 * <code>File</code> instance is created as if by invoking the
339 * single-argument <code>File</code> constructor on the given
347 * abstract pathname then the new <code>File</code> instance is created by
358 public File(File parent, String child) {
377 * Creates a new <tt>File</tt> instance by converting the given
387 * new File(</tt><i>&nbsp;f</i><tt>.{@link #toURI() toURI}()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
412 public File(URI uri) {
434 if (File.separatorChar != '/')
435 p = p.replace('/', File.separatorChar);
498 public File getParentFile() {
501 return new File(p, this.prefixLength);
553 * @see java.io.File#isAbsolute()
561 * <code>new&nbsp;File(this.{@link #getAbsolutePath})</code>.
571 public File getAbsoluteFile() {
573 return new File(absPath, fs.prefixLength(absPath));
623 * <code>new&nbsp;File(this.{@link #getCanonicalPath})</code>.
642 public File getCanonicalFile() throws IOException {
644 return new File(canonPath, fs.prefixLength(canonPath));
649 if (File.separatorChar != '/')
650 p = p.replace(File.separatorChar, '/');
699 * new {@link #File(java.net.URI) File}(</tt><i>&nbsp;f</i><tt>.toURI()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
724 * @see #File(java.net.URI)
731 File f = getAbsoluteFile();
972 /* -- File operations -- */
1127 * FilenameFilter#accept FilenameFilter.accept(File,&nbsp;String)} method
1167 * method returns {@code null}. Otherwise an array of {@code File} objects
1171 * constructed from this abstract pathname using the {@link #File(File,
1172 * String) File(File,&nbsp;String)} constructor. Therefore if this
1200 public File[] listFiles() {
1204 File[] fs = new File[n];
1206 fs[i] = new File(ss[i], this);
1220 * FilenameFilter.accept(File,&nbsp;String)} method of the filter is
1241 public File[] listFiles(FilenameFilter filter) {
1244 ArrayList<File> files = new ArrayList<>();
1247 files.add(new File(s, this));
1248 return files.toArray(new File[files.size()]);
1259 * the {@link FileFilter#accept FileFilter.accept(File)} method of the
1279 public File[] listFiles(FileFilter filter) {
1282 ArrayList<File> files = new ArrayList<>();
1284 File f = new File(s, this);
1288 return files.toArray(new File[files.size()]);
1340 File canonFile = null;
1347 File parent = canonFile.getParentFile();
1379 public boolean renameTo(File dest) {
1723 * <p> This method returns an array of {@code File} objects that denote the
1733 * returned by this method. Thus, for example, {@code File} objects
1735 * platform will be returned by this method, while {@code File} objects
1744 * @return An array of {@code File} objects denoting the available
1752 public static File[] listRoots() {
1871 private static final File tmpdir = new File(AccessController
1873 static File location() {
1879 static File generateFile(String prefix, String suffix, File dir)
1889 File f = new File(dir, name);
1965 public static File createTempFile(String prefix, String suffix,
1966 File directory)
1974 File tmpdir = (directory != null) ? directory
1976 File f;
1996 * java.lang.String, java.io.File)
2029 public static File createTempFile(String prefix, String suffix)
2054 public int compareTo(File pathname) {
2073 if ((obj != null) && (obj instanceof File)) {
2074 return compareTo((File)obj) == 0;