(String[] args)
| 15 | */ |
| 16 | public class FileDemo2 { |
| 17 | public static void main(String[] args) throws IOException { |
| 18 | // ����File���� |
| 19 | File file = new File("a.txt"); |
| 20 | System.out.println("createNewFile:" + file.createNewFile()); |
| 21 | |
| 22 | File file2 = new File("aaa\\bbb"); |
| 23 | System.out.println("mkdirs:" + file2.mkdirs()); |
| 24 | |
| 25 | File file3 = new File(file2, "b.txt"); |
| 26 | System.out.println("createNewFile:" + file3.createNewFile()); |
| 27 | |
| 28 | // ɾ���ļ� |
| 29 | System.out.println("delete:" + file.delete()); |
| 30 | |
| 31 | // ɾ���ļ��� |
| 32 | File file4 = new File("aaa\\bbb\\ccc"); |
| 33 | System.out.println("delete:" + file4.delete()); |
| 34 | |
| 35 | File file5 = new File("aaa"); |
| 36 | System.out.println("delete:" + file5.delete()); |
| 37 | } |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected