Module java.base
Package java.io

# Class File

=
public class File
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<java.io.File>

## Fields

- =
  public static final java.lang.String pathSeparator
- =
  public static final char pathSeparatorChar
- =
  public static final java.lang.String separator
- =
  public static final char separatorChar

## Constructors

- =
  public File(java.io.File arg0, java.lang.String arg1)
- =
  public File(java.lang.String arg0)
- =
  public File(java.lang.String arg0, java.lang.String arg1)
- =
  public File(java.net.URI arg0)

## Methods

- =
  public boolean canExecute()
- =
  public boolean canRead()
- =
  public boolean canWrite()
- =
  public int compareTo(java.io.File arg0)
- =
  public boolean createNewFile() throws java.io.IOException
- =
  public static java.io.File createTempFile(java.lang.String arg0, java.lang.String arg1) throws java.io.IOException
- =
  public static java.io.File createTempFile(java.lang.String arg0, java.lang.String arg1, java.io.File arg2) throws java.io.IOException
- =
  public boolean delete()
- =
  public void deleteOnExit()
- =
  public boolean equals(java.lang.Object arg0)
- =
  public boolean exists()
- =
  public java.io.File getAbsoluteFile()
- =
  public java.lang.String getAbsolutePath()
- =
  public java.io.File getCanonicalFile() throws java.io.IOException
- =
  public java.lang.String getCanonicalPath() throws java.io.IOException
- =
  public long getFreeSpace()
- =
  public java.lang.String getName()
- =
  public java.lang.String getParent()
- =
  public java.io.File getParentFile()
- =
  public java.lang.String getPath()
- =
  public long getTotalSpace()
- =
  public long getUsableSpace()
- =
  public int hashCode()
- =
  public boolean isAbsolute()
- =
  public boolean isDirectory()
- =
  public boolean isFile()
- =
  public boolean isHidden()
- =
  public long lastModified()
- =
  public long length()
- =
  public java.lang.String[] list()
- =
  public java.lang.String[] list(java.io.FilenameFilter arg0)
- =
  public java.io.File[] listFiles()
- =
  public java.io.File[] listFiles(java.io.FileFilter arg0)
- =
  public java.io.File[] listFiles(java.io.FilenameFilter arg0)
- =
  public static java.io.File[] listRoots()
- =
  public boolean mkdir()
- =
  public boolean mkdirs()
- =
  public boolean renameTo(java.io.File arg0)
- =
  public boolean setExecutable(boolean arg0)
- =
  public boolean setExecutable(boolean arg0, boolean arg1)
- =
  public boolean setLastModified(long arg0)
- =
  public boolean setReadOnly()
- =
  public boolean setReadable(boolean arg0)
- =
  public boolean setReadable(boolean arg0, boolean arg1)
- =
  public boolean setWritable(boolean arg0)
- =
  public boolean setWritable(boolean arg0, boolean arg1)
- =
  public java.nio.file.Path toPath()
- =
  public java.lang.String toString()
- =
  public java.net.URI toURI()
- =
  @Deprecated
  public java.net.URL toURL() throws java.net.MalformedURLException

## Serialized Form

=

### serialVersionUID

=301077366599181567

### Serialized Fields

- =
  java.lang.String path

### Serialization Methods

- =
  private void readObject(java.io.ObjectInputStream arg0) throws java.io.IOException, java.lang.ClassNotFoundException
- =
  private void writeObject(java.io.ObjectOutputStream arg0) throws java.io.IOException

## Summary

No differences.