Posted on 2006-01-11 14:40
yoyozy 閱讀(156)
評論(0) 編輯 收藏
目錄文件的操作
目錄文件的操作也是除了數據庫操作以外,經常需要操作的一個數據對象.
移動文件,相當于linux 中mv命令,但與平臺無關:
/**
* This class moves an input file to output file
*
* @param
String input file to move from
* @param String output
file
*
*/
public static void move (String input, String
output){
File inputFile = new File(input);
File outputFile = new
File(output);
inputFile.renameTo(outputFile);
}
<

文章來源:
http://blog.donews.com/yoyozy/archive/2005/11/02/611867.aspx