http://www.verejava.com/?id=17160003163645
Import Java.io.file;import Java.io.ioexception;public class Test {public static void main (string[] args) {//Fi Le F=file (String pathname) file F=new file ("Test.txt"); try {//Boolean createnewfile () if the file does not exist create a new empty file if there is no f.createnewfile () created; String GetAbsolutePath ()//Gets the absolute path of the file System.out.println (F.getabsolutepath ()); String getName ()//Get file name System.out.println (F.getname ()); Long length ()//Gets the file contents byte size System.out.println (F.length ()); Boolean Renameto (file dest)//rename file F.renameto ("Rename.txt"); Boolean isfile ()//Determine if the file is System.out.println (F.isfile ()); Boolean exists ()//Determine if the file exists System.out.println (f.exists ()); Boolean delete ()//deleteExcept for document SYSTEM.OUT.PRINTLN (F.delete ()); } catch (IOException ex) {ex.printstacktrace (); } }}
http://www.verejava.com/?id=17160003163645
The file class of the Java io stream