File class
Java.io.File class represents system file name
Common construction methods for the file class:
The public file (String pathname) creates a file object with pathname as the path, and if pathname is a relative path, the default current path in the system property
Public file (string parent, String child) takes the parent path to the father, and children creates a File object for the subpath
The static property of file, string separator, stores the path delimiter for the current system
File Common methods
The file object can access the properties of the files
public boolean canRead ();
public boolean canWrite ();
public boolean exists ();
public boolean isdirctory ();
public boolean isfile ();
public boolean Ishidden ();
Public long lastmodified ();//Last Modified time
public long length ();
Public String getName ();
Public String GetPath ();
Create an empty file or directory from the file object (in the case where the object refers to a document or directory that does not exist)
public Boolean creatnewfile () throws IOException
public Boolean Delete ()
Public Booean mkdir ();
public boolean mkdirs ();
Horse Soldier Java Tutorial Note 4