Posted on 2006-01-11 14:40
yoyozy 阅读(147)
评论(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