📄 file.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/File.html">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#createTempFile(java.lang.String, java.lang.String)">createTempFile</A></B>(<A HREF="../../java/lang/String.html">String</A> prefix, <A HREF="../../java/lang/String.html">String</A> suffix)</CODE><BR> Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/File.html">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#createTempFile(java.lang.String, java.lang.String, java.io.File)">createTempFile</A></B>(<A HREF="../../java/lang/String.html">String</A> prefix, <A HREF="../../java/lang/String.html">String</A> suffix, <A HREF="../../java/io/File.html">File</A> directory)</CODE><BR> Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#delete()">delete</A></B>()</CODE><BR> Deletes the file or directory denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#deleteOnExit()">deleteOnExit</A></B>()</CODE><BR> Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</CODE><BR> Tests this abstract pathname for equality with the given object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#exists()">exists</A></B>()</CODE><BR> Tests whether the file denoted by this abstract pathname exists.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getAbsoluteFile()">getAbsoluteFile</A></B>()</CODE><BR> Returns the absolute form of this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getAbsolutePath()">getAbsolutePath</A></B>()</CODE><BR> Returns the absolute pathname string of this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getCanonicalFile()">getCanonicalFile</A></B>()</CODE><BR> Returns the canonical form of this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getCanonicalPath()">getCanonicalPath</A></B>()</CODE><BR> Returns the canonical pathname string of this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getName()">getName</A></B>()</CODE><BR> Returns the name of the file or directory denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getParent()">getParent</A></B>()</CODE><BR> Returns the pathname string of this abstract pathname's parent, or <code>null</code> if this pathname does not name a parent directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getParentFile()">getParentFile</A></B>()</CODE><BR> Returns the abstract pathname of this abstract pathname's parent, or <code>null</code> if this pathname does not name a parent directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#getPath()">getPath</A></B>()</CODE><BR> Converts this abstract pathname into a pathname string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#hashCode()">hashCode</A></B>()</CODE><BR> Computes a hash code for this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#isAbsolute()">isAbsolute</A></B>()</CODE><BR> Tests whether this abstract pathname is absolute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#isDirectory()">isDirectory</A></B>()</CODE><BR> Tests whether the file denoted by this abstract pathname is a directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#isFile()">isFile</A></B>()</CODE><BR> Tests whether the file denoted by this abstract pathname is a normal file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#isHidden()">isHidden</A></B>()</CODE><BR> Tests whether the file named by this abstract pathname is a hidden file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#lastModified()">lastModified</A></B>()</CODE><BR> Returns the time that the file denoted by this abstract pathname was last modified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#length()">length</A></B>()</CODE><BR> Returns the length of the file denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#list()">list</A></B>()</CODE><BR> Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#list(java.io.FilenameFilter)">list</A></B>(<A HREF="../../java/io/FilenameFilter.html">FilenameFilter</A> filter)</CODE><BR> Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#listFiles()">listFiles</A></B>()</CODE><BR> Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#listFiles(java.io.FileFilter)">listFiles</A></B>(<A HREF="../../java/io/FileFilter.html">FileFilter</A> filter)</CODE><BR> Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/File.html">File</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#listFiles(java.io.FilenameFilter)">listFiles</A></B>(<A HREF="../../java/io/FilenameFilter.html">FilenameFilter</A> filter)</CODE><BR> Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/File.html">File</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#listRoots()">listRoots</A></B>()</CODE><BR> List the available filesystem roots.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#mkdir()">mkdir</A></B>()</CODE><BR> Creates the directory named by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#mkdirs()">mkdirs</A></B>()</CODE><BR> Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#renameTo(java.io.File)">renameTo</A></B>(<A HREF="../../java/io/File.html">File</A> dest)</CODE><BR> Renames the file denoted by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/File.html#setLastModified(long)">setLastModified</A></B>(long time)</CODE><BR> Sets the last-modified time of the file or directory named by this abstract pathname.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -