File class: Used to describe a document or directory (folder) in the file system.
The function of the file class: We can get multiple files or directories by file name, size, and so on the date and other information, single cannot access the contents of the file.
File.separator constants To resolve differences in directory separators between operating systems, such as under window:. \xxx.txt;linux under:./xxx.txt;
File class Common method: String GetName () gets the name of the files or directories; Long length () Gets the size of the file, and long GetPath () Gets the path of the file or directory, returning as a string; string GetAbsolutePath () Gets the absolute path to the file or directory, and String Getcanoniclpath () Gets the absolute path of the operating system, but the method catches the exception with Western medicine; long LastModified () Gets the last time the file was modified, The millisecond value; Boolean exists () determines whether the current file directory exists on the hard disk, exists not true, does not exist False;boolean Isfile () determines whether the current file object describes a folder; Boolean Isdirectory () Determines whether the current file object describes a directory, a Boolean mkdir () creates a directory of file descriptions, a Boolean mkdirs () creates a directory, and creates all non-existent ancestor directories, when creating a multilevel directory, You should choose to use the Mkdirs () method, and if you create a file in a multilevel directory, make sure that the file is in the directory where you created the file, and the Boolean delete () Delete to ensure that there are no subkeys in the directory to delete the directory.
Application I/O for Java data streams