Method |
Description |
boolean canExecute() |
By its abstract path name the program execute the file is tested with the current method and returns Boolean value. |
boolean canRead() |
By its abstract path name the program reads the file is tested with the current method and returns value in boolean. |
boolean canWrite() |
By its abstract path name the program writes the file is tested with this current method and returns value in boolean. |
boolean createNewFile() |
By its abstract path name the method creates a new file which doesn’t exist already with the same name. |
boolean delete() |
The files or directories which are denoted by its abstract path name are deleted. |
boolean exists() |
By its abstract path name the method checks whether the directory or file either exist or not. |
boolean equals(Object obj) |
To get equality for the given object this method checks its abstract path name. |
boolean isAbsolute() |
The abstract path name is tested by this method whether it is absolute or not . |
boolean isDirectory() |
The file tested by the current method represents directory denoted with abstract path name. |
boolean isFile() |
The file tested by the current method represents normal file denoted with abstract path name. |
boolean isHidden() |
The file which represents by its abstract path name is hidden file, tested by the current method. |
boolean mkdir() |
The new directory is created with the current method. |
boolean mkdirs() |
The new directory is created with the current method but not exist parent directories. |
boolean renameTo(File dest) |
The use of this method is to rename the file. |
boolean setExecutable(boolean executable) |
To this abstract path name the convenience method sets the owner’s to execute permission. |
boolean setExecutable(boolean executable, boolean ownerOnly) |
To this abstract path name the method sets the owner’s to execute permission. |
boolean setLastModified(long time) |
To this abstract path name the method can set the last modified time of the directory or file . |
boolean setReadable(boolean readable) |
To this abstract path name the method sets the owner’s to read permission. |
boolean setReadable(boolean readable, boolean ownerOnly) |
To this abstract path name the method sets the owners to read permission. |
boolean setReadOnly() |
This method allows the read operations only from the file or directory. |
boolean setWritable(boolean writable) |
To this abstract path name the method can set owner’s to write the permission. |
boolean setWritable(boolean writable, boolean ownerOnly) |
To this abstract path name the method can set the owner’s only to write the permission. |
String toString() |
To abstract path name the method returns the pathname string. |
URI toURI() |
The URI file which is constructed by this method represents abstract pathname. |
int compareTo(File pathname) |
Abstract pathnames are compared by this method lexicographically. |
void deleteOnExit() |
At the time when the JVM terminates the directories or files which are denoted by its abstract pathname are deleted. |
static File createTempFile(String prefix, String suffix) |
By making use of the specified prefix and suffix to generate name of the empty file creates by this method in default temporary file directory. |
static File createTempFile(String prefix, String suffix, File directory) |
By making use of the specified prefix and suffix to generate name of the empty file creates by this method in specified file directory. |
String getAbsolutePath() |
By its abstract pathname the method returns absolute pathname. |
File getAbsoluteFile() |
By its abstract pathname the method returns absolute file. |
File getCanonicalFile() |
By its abstract pathname the method returns canonical form. |
String getCanonicalPath() |
By its abstract pathname the method returns canonical pathname. |
long getFreeSpace() |
By its abstract pathname the method returns bytes which are unallocated in the partition. |
String getName() |
The files or directories which are denoted by its abstract pathname are named by this method. |
String getParent() |
In this method the parent path name returns abstract path name of its string. If parent directory doesn't name it returns to be null. |
String getPath() |
The path name string is obtained from abstract path name by this method. |
File getParentFile() |
In this method the parent path name returns abstract path name of its string. If parent directory doesn't name it returns to be null. |
long getTotalSpace() |
By its abstract path name the method returns size of the named partition. |
long getUsableSpace() |
By its abstract path name the method returns to the JVM that number of bytes exists already. |
int hashCode() |
For its abstract pathname this method computes a hash code. |
long lastModified() |
The file which is represented by abstract path name is modified at last, which was return by this method. |
long length() |
By its abstract path name the method returns the file length. |
String[] list() |
By its abstract path name the method returns the strings representing the files or directories in the form of an array. |
String[] list(FilenameFilter filter) |
By its abstract path name, method returns strings representing files and directory in the form of array which satisfies the represented filter. |
File[] listFiles() |
By its abstract path name, method returns the files in the directory in the form of array. |
File[] listFiles(FileFilter filter) |
By its abstract path name, method returns the files in the directory in the form of array which satisfies the represented filter. |
File[] listFiles(FilenameFilter filter) |
By its abstract path name, method returns the files in the directory in the form of array which satisfies the represented filter. |
static File[] listRoots() |
This method lists about existing file system roots. |