Skip to main content

Class: File

This page documents the methods and fields available in the File class.

Members

SignatureDescription
File(String)Creates a new instance of File.
File(String, String)Creates a new instance of File.
File(String, boolean)Creates a new instance of File.
File(URI)Creates a new instance of File.
File(java.io.File)Creates a new instance of File.
File(java.io.File, String)Creates a new instance of File.
File(java.io.File, String, boolean)Creates a new instance of File.
File(java.io.File, boolean)Creates a new instance of File.
canExecute()Returns whether execute is true.
canRead()Returns whether read is true.
canWrite()Returns whether write is true.
compareTo(File)Compares this instance with another for equality/order.
delete()Removes an item from the collection.
deleteOnExit()Removes on exit from the collection.
equals(Object)Compares this instance with another for equality/order.
exists()Performs the exists operation.
getAbsoluteFile()Returns the current absolute file.
getAbsolutePath()Returns the current absolute path.
getFreeSpace()Returns the current free space.
getName()Returns the current name.
getParent()Returns the current parent.
getParentFile()Returns the current parent file.
getPath()Returns the current path.
getTotalSpace()Returns the current total space.
getUsableSpace()Returns the current usable space.
hashCode()Returns whether code is true.
isAbsolute()Returns whether absolute is true.
isAccessible()Returns whether accessible is true.
isAccessible(String)Returns whether accessible is true.
isDirectory()Returns whether directory is true.
isFile()Returns whether file is true.
isHidden()Returns whether hidden is true.
lastModified()Performs the lastModified operation.
length()Performs the length operation.
list()Performs the list operation.
list(FilenameFilter)Performs the list operation using the provided parameters (filter).
listFiles()Performs the listFiles operation.
listFiles(FileFilter)Performs the listFiles operation using the provided parameters (filter).
listFiles(FilenameFilter)Performs the listFiles operation using the provided parameters (filter).
mkdir()Performs the mkdir operation.
mkdirs()Performs the mkdirs operation.
renameTo(File)Performs the renameTo operation using the provided parameters (dest).
setExecutable(boolean)Sets or updates the executable.
setExecutable(boolean, boolean)Sets or updates the executable.
setLastModified(long)Sets or updates the last modified.
setReadOnly()Sets or updates the read only.
setReadable(boolean)Sets or updates the readable.
setReadable(boolean, boolean)Sets or updates the readable.
setWritable(boolean)Sets or updates the writable.
setWritable(boolean, boolean)Sets or updates the writable.
toPath()Performs the toPath operation.
toURI()Performs the toURI operation.