<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.File
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.DataOutputStream.html#_top_">Previous</a>  <a href="java.io.FileDescriptor.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.File
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.io.File
</pre>
<hr>
<dl>
  <dt> public class <b>File</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
Instances of this class represent the name of a file or directory 
 on the host file system. A file is specified by a pathname, which 
 can either be an absolute pathname or a pathname relative to the 
 current working directory. The pathname must follow the naming 
 conventions of the host platform. 
 <p>
 The <code>File</code> class is intended to provide an abstraction 
 that deals with most of the machine dependent complexities of 
 files and pathnames in a machine-independent fashion. 
 <p>
 Note that whenever a filename or path is used it is
 assumed that the host's file naming conventions are used.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#pathSeparator"><b>pathSeparator</b></a>
  <dd>  The system-dependent path separator string.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#pathSeparatorChar"><b>pathSeparatorChar</b></a>
  <dd>  The system-dependent path separator character.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#separator"><b>separator</b></a>
  <dd>  The system-dependent path separator string.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#separatorChar"><b>separatorChar</b></a>
  <dd>  The system-dependent path separator character.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#File(java.io.File, java.lang.String)"><b>File</b></a>(File, String)
  <dd>  Creates a <code>File</code> instance that represents the file 
 with the specified name in the specified directory.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#File(java.lang.String)"><b>File</b></a>(String)
  <dd>  Creates a <code>File</code> instance that represents the file 
 whose pathname is the given path argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#File(java.lang.String, java.lang.String)"><b>File</b></a>(String, String)
  <dd>  Creates a <code>File</code> instance whose pathname is the 
 pathname of the specified directory, followed by the separator 
 character, followed by the <code>name</code> argument.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#canRead()"><b>canRead</b></a>()
  <dd>  Tests if the application can read from the specified file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#canWrite()"><b>canWrite</b></a>()
  <dd>  Tests if the application can write to this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#delete()"><b>delete</b></a>()
  <dd>  Deletes the file specified by this object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Compares this object against the specified object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#exists()"><b>exists</b></a>()
  <dd>  Tests if this <code>File</code> exists.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAbsolutePath()"><b>getAbsolutePath</b></a>()
  <dd>  Returns the absolute pathname of the file represented by this object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getCanonicalPath()"><b>getCanonicalPath</b></a>()
  <dd>  Returns the canonical form of this <code>File</code> object's pathname.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getName()"><b>getName</b></a>()
  <dd>  Returns the name of the file represented by this object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getParent()"><b>getParent</b></a>()
  <dd>  Returns the parent part of the pathname of this <code>File</code>
 object, or <code>null</code> if the name has no parent part.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPath()"><b>getPath</b></a>()
  <dd>  Returns the pathname of the file represented by this object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Computes a hashcode for the file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isAbsolute()"><b>isAbsolute</b></a>()
  <dd>  Tests if the file represented by this <code>File</code> object is an
 absolute pathname.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isDirectory()"><b>isDirectory</b></a>()
  <dd>  Tests if the file represented by this <code>File</code> 
 object is a directory.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isFile()"><b>isFile</b></a>()
  <dd>  Tests if the file represented by this <code>File</code> 
 object is a "normal" file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lastModified()"><b>lastModified</b></a>()
  <dd>  Returns the time that the file represented by this 
 <code>File</code> object was last modified.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#length()"><b>length</b></a>()
  <dd>  Returns the length of the file represented by this 
 <code>File</code> object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#list()"><b>list</b></a>()
  <dd>  Returns a list of the files in the directory specified by this
 <code>File</code> object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#list(java.io.FilenameFilter)"><b>list</b></a>(FilenameFilter)
  <dd>  Returns a list of the files in the directory specified by this 
 <code>File</code> that satisfy the specified filter.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#mkdir()"><b>mkdir</b></a>()
  <dd>  Creates a directory whose pathname is specified by this 
 <code>File</code> object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#mkdirs()"><b>mkdirs</b></a>()
  <dd>  Creates a directory whose pathname is specified by this 
 <code>File</code> object, including any necessary parent directories.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#renameTo(java.io.File)"><b>renameTo</b></a>(File)
  <dd>  Renames the file specified by this <code>File</code> object to 
 have the pathname given by the <code>File</code> argument.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns a string representation of this object.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="separator"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>separator</b>
<pre>
 public static final <a href="java.lang.String.html#_top_">String</a> separator
</pre>
<dl>
  <dd> The system-dependent path separator string. This field is 
 initialized to contain the value of the system property 
 <code>file.separator</code>.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>
  </dl></dd>
</dl>
<a name="separatorChar"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>separatorChar</b>
<pre>
 public static final char separatorChar
</pre>
<dl>
  <dd> The system-dependent path separator character. This field is 
 initialized to contain the first character of the value of the 
 system property <code>file.separator</code>. This character 
 separates the directory and file components in a filename.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>
  </dl></dd>
</dl>
<a name="pathSeparator"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>pathSeparator</b>
<pre>
 public static final <a href="java.lang.String.html#_top_">String</a> pathSeparator
</pre>
<dl>
  <dd> The system-dependent path separator string. This field is 
 initialized to contain the value of the system property 
 <code>path.separator</code>.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>
  </dl></dd>
</dl>
<a name="pathSeparatorChar"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>pathSeparatorChar</b>
<pre>
 public static final char pathSeparatorChar
</pre>
<dl>
  <dd> The system-dependent path separator character. This field is 
 initialized to contain the first character of the value of the 
 system property <code>path.separator</code>. This character is 
 often used to separate filenames in a sequence of files given as a 
 "path list".<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>
  </dl></dd>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="File"></a>
<a name="File(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>File</b>
<pre>
 public File(<a href="java.lang.String.html#_top_">String</a> path)
</pre>
<dl>
  <dd> Creates a <code>File</code> instance that represents the file 
 whose pathname is the given path argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> path - the file pathname.
    <dt> <b>Throws:</b> <a href="java.lang.NullPointerException.html#_top_">NullPointerException</a>
    <dd> if the file path is equal to
               <code>null</code>.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>
  </dl></dd>
</dl>
<a name="File(java.lang.String, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>File</b>
<pre>
 public File(<a href="java.lang.String.html#_top_">String</a> path,
             <a href="java.lang.String.html#_top_">String</a> name)
</pre>
<dl>
  <dd> Creates a <code>File</code> instance whose pathname is the 
 pathname of the specified directory, followed by the separator 
 character, followed by the <code>name</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> path - the directory pathname.
    <dd> name - the file pathname.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#separator">separator</a>
  </dl></dd>
</dl>
<a name="File(java.io.File, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>File</b>
<pre>
 public File(<a href="#_top_">File</a> dir,
             <a href="java.lang.String.html#_top_">String</a> name)
</pre>
<dl>
  <dd> Creates a <code>File</code> instance that represents the file 
 with the specified name in the specified directory. 
 <p>
 If the directory argument is <code>null</code>, the resulting 
 <code>File</code> instance represents a file in the 
 (system-dependent) current directory whose pathname is the 
 <code>name</code> argument. Otherwise, the <code>File</code> 
 instance represents a file whose pathname is the pathname of the 
 directory, followed by the separator character, followed by the 
 <code>name</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dir - the directory.
    <dd> name - the file pathname.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#separator">separator</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getName"><b>getName</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getName()
</pre>
<dl>
  <dd> Returns the name of the file represented by this object. The name 
 is everything in the pathame after the last occurrence of the 
 separator character.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the name of the file (without any directory components)
          represented by this <code>File</code> object.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#separator">separator</a>
  </dl></dd>
</dl>
<a name="getPath()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPath"><b>getPath</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getPath()
</pre>
<dl>
  <dd> Returns the pathname of the file represented by this object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the pathname represented by this <code>File</code> object.
  </dl></dd>
</dl>
<a name="getAbsolutePath()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAbsolutePath"><b>getAbsolutePath</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getAbsolutePath()
</pre>
<dl>
  <dd> Returns the absolute pathname of the file represented by this object.
 If this object represents an absolute pathname, then return the 
 pathname. Otherwise, return a pathname that is a concatenation of 
 the current user directory, the separator character, and the 
 pathname of this file object. 
 <p>
 The system property <code>user.dir</code> contains the current 
 user directory.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a system-dependent absolute pathname for this <code>File</code>.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#isAbsolute()">isAbsolute</a>, <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>
  </dl></dd>
</dl>
<a name="getCanonicalPath()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getCanonicalPath"><b>getCanonicalPath</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getCanonicalPath() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the canonical form of this <code>File</code> object's pathname.
 The precise definition of canonical form is system-dependent, but it
 usually specifies an absolute pathname in which all relative references
 and references to the current user directory have been completely
 resolved.  The canonical form of a pathname of a nonexistent file may
 not be defined.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs, which is possible because
 the construction of the canonical path may require filesystem queries.
  </dl></dd>
</dl>
<a name="getParent()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getParent"><b>getParent</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getParent()
</pre>
<dl>
  <dd> Returns the parent part of the pathname of this <code>File</code>
 object, or <code>null</code> if the name has no parent part.  The parent
 part is generally everything leading up to the last occurrence of the
 separator character, although the precise definition is system
 dependent.  On UNIX, for example, the parent part of
 <code>"/usr/lib"</code> is <code>"/usr"</code>, whose parent part is
 <code>"/"</code>, which in turn has no parent.  On Windows platforms,
 the parent part of <code>"c:\java"</code> is <code>"c:\"</code>, which
 in turn has no parent.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#getCanonicalPath()">getCanonicalPath</a>, <a href="#separator">separator</a>
  </dl></dd>
</dl>
<a name="exists()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="exists"><b>exists</b></a>
<pre>
 public boolean exists()
</pre>
<dl>
  <dd> Tests if this <code>File</code> exists.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the file specified by this object
             exists; <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="canWrite()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="canWrite"><b>canWrite</b></a>
<pre>
 public boolean canWrite()
</pre>
<dl>
  <dd> Tests if the application can write to this file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the application is allowed to write to
             a file whose name is specified by this object;
            <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkWrite</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed write access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkWrite(java.lang.String)">checkWrite</a>
  </dl></dd>
</dl>
<a name="canRead()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="canRead"><b>canRead</b></a>
<pre>
 public boolean canRead()
</pre>
<dl>
  <dd> Tests if the application can read from the specified file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the file specified by this object exists
             and the application can read the file;
             <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="isFile()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isFile"><b>isFile</b></a>
<pre>
 public boolean isFile()
</pre>
<dl>
  <dd> Tests if the file represented by this <code>File</code> 
 object is a "normal" file. 
 <p>
 A file is "normal" if it is not a directory and, in 
 addition, satisfies other system-dependent criteria. Any 
 non-directory file created by a Java application is guaranteed to 
 be a normal file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the file specified by this object
             exists and is a "normal" file; <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> If a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="isDirectory()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isDirectory"><b>isDirectory</b></a>
<pre>
 public boolean isDirectory()
</pre>
<dl>
  <dd> Tests if the file represented by this <code>File</code> 
 object is a directory.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if this <code>File</code> exists and is a
             directory; <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="isAbsolute()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isAbsolute"><b>isAbsolute</b></a>
<pre>
 public native boolean isAbsolute()
</pre>
<dl>
  <dd> Tests if the file represented by this <code>File</code> object is an
 absolute pathname. The definition of an absolute pathname is system 
 dependent. For example, on UNIX, a pathname is absolute if its 
 first character is the separator character. On Windows platforms, 
 a pathname is absolute if its first character is an ASCII '&#92;' or 
 '/', or if it begins with a letter followed by a colon.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the pathname indicated by the
          <code>File</code> object is an absolute pathname;
          <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="#separator">separator</a>
  </dl></dd>
</dl>
<a name="lastModified()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="lastModified"><b>lastModified</b></a>
<pre>
 public long lastModified()
</pre>
<dl>
  <dd> Returns the time that the file represented by this 
 <code>File</code> object was last modified. 
 <p>
 The return value is system dependent and should only be used to 
 compare with other values returned by last modified. It should not 
 be interpreted as an absolute time.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the time the file specified by this object was last modified,
             or <code>0L</code> if the specified file does not exist.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="length()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="length"><b>length</b></a>
<pre>
 public long length()
</pre>
<dl>
  <dd> Returns the length of the file represented by this 
 <code>File</code> object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the length, in bytes, of the file specified by this object,
             or <code>0L</code> if the specified file does not exist.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="mkdir()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="mkdir"><b>mkdir</b></a>
<pre>
 public boolean mkdir()
</pre>
<dl>
  <dd> Creates a directory whose pathname is specified by this 
 <code>File</code> object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the directory could be created;
             <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkWrite</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed write access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkWrite(java.lang.String)">checkWrite</a>
  </dl></dd>
</dl>
<a name="renameTo(java.io.File)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="renameTo"><b>renameTo</b></a>
<pre>
 public boolean renameTo(<a href="#_top_">File</a> dest)
</pre>
<dl>
  <dd> Renames the file specified by this <code>File</code> object to 
 have the pathname given by the <code>File</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dest - the new filename.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the renaming succeeds;
             <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkWrite</code> method is called both with the
               pathname of this file object and with the pathname of the
               destination target object to see if the application is
               allowed to write to both files.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkWrite(java.lang.String)">checkWrite</a>
  </dl></dd>
</dl>
<a name="mkdirs()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="mkdirs"><b>mkdirs</b></a>
<pre>
 public boolean mkdirs()
</pre>
<dl>
  <dd> Creates a directory whose pathname is specified by this 
 <code>File</code> object, including any necessary parent directories.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the directory (or directories) could be
             created; <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkWrite</code> method is called with the pathname
               of each of the directories that is to be created, before
               any of the directories are created.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkWrite(java.lang.String)">checkWrite</a>
  </dl></dd>
</dl>
<a name="list()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="list"><b>list</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a>[] list()
</pre>
<dl>
  <dd> Returns a list of the files in the directory specified by this
 <code>File</code> object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an array of file names in the specified directory.
             This list does not include the current directory or the
             parent directory ("<code>.</code>" and "<code>..</code>"
             on Unix systems).
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> If a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="list(java.io.FilenameFilter)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="list"><b>list</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a>[] list(<a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a> filter)
</pre>
<dl>
  <dd> Returns a list of the files in the directory specified by this 
 <code>File</code> that satisfy the specified filter.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> filter - a filename filter.
    <dt> <b>Returns:</b>
    <dd> an array of file names in the specified directory.
             This list does not include the current directory or the
             parent directory ("<code>.</code>" and "<code>..</code>"
             on Unix systems).
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> If a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> to see if the application is
               allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="delete()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="delete"><b>delete</b></a>
<pre>
 public boolean delete()
</pre>
<dl>
  <dd> Deletes the file specified by this object.  If the target
 file to be deleted is a directory, it must be empty for deletion
 to succeed.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the file is successfully deleted;
             <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkDelete</code> method is called with the
               pathname of this <code>File</code> to see if the
               application is allowed to delete the file.
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkDelete(java.lang.String)">checkDelete</a>
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Computes a hashcode for the file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hash code value for this <code>File</code> object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Compares this object against the specified object.
 Returns <code>true</code> if and only if the argument is 
 not <code>null</code> and is a <code>File</code> object whose 
 pathname is equal to the pathname of this object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - the object to compare with.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the objects are the same;
          <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns a string representation of this object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string giving the pathname of this object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
    <dt> <b>See Also:</b>
    <dd> <a href="#getPath()">getPath</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.DataOutputStream.html#_top_">Previous</a>  <a href="java.io.FileDescriptor.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
