package joeho.net.csdn.blog.io;
import java.io.*;
public class FileTest {
/**
* Method main
*
*
* @param args
*
*/
public static void main(String[] args) throws IOException {
File f = new File("test.txt");
if(f.exists()){
f.delete();
}
else{
f.createNewFile();
}
System.out.println(f.getName());
System.out.println(f.getAbsolutePath());
System.out.println(f.getParentFile());
System.out.println(f.canWrite()?"Canwrite":"not Canwrite");
}
}