📄 fileutils.java
字号:
package com.bwm.core;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
/**
* <p>Title: mingrisoft</p>
* <p>Description: 明日科技门户网站</p>
* <p>Copyright: Copyright (c) 2005</p>
* <p>Company: MR</p>
* @author BWM
* @version 1.0
*/
public class FileUtils {
public FileUtils() {
}
public static boolean FileDel(HttpServletRequest request ,String path) {
if(path==null) return false;
path=request.getSession().getServletContext().getRealPath(path);
System.out.println(path+" ]path");
File f = new File(path);
if (!f.exists()) {
return false;
} else {
if (f.delete()) {
return true;
}
}
return false;
}
public static void main(String[] args) {
FileUtils fileUtils1 = new FileUtils();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -