标签:文件夹
//ftp.makeDirectory(path);// 这个方法不会改变当前工作目录
//保证可以创建多层目录
StringTokenizer s = new StringTokenizer(path, "/");
s.countTokens();
String pathName = "";
while (s.hasMoreElements()) {
pathName = pathName + "/" + (String) s.nextElement();
try {
ftp.mkd(pathName);
} catch (Exception e) {
log.info("ftp文件夹创建失败");
}
}
本文出自 “小西天” 博客,请务必保留此出处http://gggcgba.blog.51cto.com/3889163/1547512
标签:文件夹
原文地址:http://gggcgba.blog.51cto.com/3889163/1547512