/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Package-private abstract class for the local filesystem abstraction.
*/
abstract class FileSystem {
/**
* Return the FileSystem object representing this platform's local
* filesystem.
*/
/* -- Normalization and construction -- */
/**
* Return the local filesystem's name-separator character.
*/
public abstract char getSeparator();
/**
* Return the local filesystem's path-separator character.
*/
public abstract char getPathSeparator();
/**
* Convert the given pathname string to normal form. If the string is
* already in normal form then it is simply returned.
*/
/**
* Compute the length of this pathname string's prefix. The pathname
* string must be in normal form.
*/
/**
* Resolve the child pathname string against the parent.
* Both strings must be in normal form, and the result
* will be in normal form.
*/
/**
* Return the parent pathname string to be used when the parent-directory
* argument in one of the two-argument File constructors is the empty
* pathname.
*/
/**
* Post-process the given URI path string if necessary. This is used on
* win32, e.g., to transform "/c:/foo" into "c:/foo". The path string
* still has slash separators; code in the File class will translate them
* after this method returns.
*/
/* -- Path operations -- */
/**
* Tell whether or not the given abstract pathname is absolute.
*/
/**
* Resolve the given abstract pathname into absolute form. Invoked by the
* getAbsolutePath and getCanonicalPath methods in the File class.
*/
/* -- Attribute accessors -- */
/* Constants for simple boolean attributes */
/**
* Return the simple boolean attributes for the file or directory denoted
* by the given abstract pathname, or zero if it does not exist or some
* other I/O error occurs.
*/
/**
* Check whether the file or directory denoted by the given abstract
* pathname may be accessed by this process. The second argument specifies
* which access, ACCESS_READ, ACCESS_WRITE or ACCESS_EXECUTE, to check.
* Return false if access is denied or an I/O error occurs
*/
/**
* Set on or off the access permission (to owner only or to all) to the file
* or directory denoted by the given abstract pathname, based on the parameters
* enable, access and oweronly.
*/
/**
* Return the time at which the file or directory denoted by the given
* abstract pathname was last modified, or zero if it does not exist or
* some other I/O error occurs.
*/
/**
* Return the length in bytes of the file denoted by the given abstract
* pathname, or zero if it does not exist, is a directory, or some other
* I/O error occurs.
*/
/* -- File operations -- */
/**
* Create a new empty file with the given pathname. Return
* <code>true</code> if the file was created and <code>false</code> if a
* file or directory with the given pathname already exists. Throw an
* IOException if an I/O error occurs.
*/
throws IOException;
/**
* Delete the file or directory denoted by the given abstract pathname,
* returning <code>true</code> if and only if the operation succeeds.
*/
/**
* List the elements of the directory denoted by the given abstract
* pathname. Return an array of strings naming the elements of the
* directory if successful; otherwise, return <code>null</code>.
*/
/**
* Create a new directory denoted by the given abstract pathname,
* returning <code>true</code> if and only if the operation succeeds.
*/
/**
* Rename the file or directory denoted by the first abstract pathname to
* the second abstract pathname, returning <code>true</code> if and only if
* the operation succeeds.
*/
/**
* Set the last-modified time of the file or directory denoted by the
* given abstract pathname, returning <code>true</code> if and only if the
* operation succeeds.
*/
/**
* Mark the file or directory denoted by the given abstract pathname as
* read-only, returning <code>true</code> if and only if the operation
* succeeds.
*/
/* -- Filesystem interface -- */
/**
* List the available filesystem roots.
*/
/* -- Disk usage -- */
/* -- Basic infrastructure -- */
/**
* Compare two abstract pathnames lexicographically.
*/
/**
* Compute the hash code of an abstract pathname.
*/
// name canonicalization
static boolean useCanonCaches = true;
static boolean useCanonPrefixCache = true;
return true;
} else {
return false;
}
}
static {
}
}