![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e23. Creating a Temporary Filetry { // Create temp file. File temp = File.createTempFile("pattern", ".suffix"); // Delete temp file when program exits. temp.deleteOnExit(); // Write to temp file BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write("aString"); out.close(); } catch (IOException e) { }
e20. Creating a File e21. Getting the Size of a File e22. Deleting a File e24. Renaming a File or Directory e25. Moving a File or Directory to Another Directory e26. Getting and Setting the Modification Time of a File or Directory e27. Forcing Updates to a File to the Disk
© 2002 Addison-Wesley. |