• FILE 创建


    public class CreateDelFileUtils implements Serializable{

    /**
    *
    */
    private static final long serialVersionUID = 6901439536149050733L;
    private CreateDelFileUtils(){}

    /**
    * 通过传入的当前用户,清空当前用户所在的个人excel文件生成文件夹.
    * @param employee 当前登录用户
    */
    public static String delAndCreateSessionUser(String userId , String userName) {
    if (userId == null || userId.trim().length() < 1) {
    return null;
    }

    String path = CreateDelFileUtils.class.getResource("/").getPath();
    path = path.substring(0,path.indexOf("WEB-INF"));
    //path = "e:/";
    File file = new File(path + "chart-image/" + userId);
    if (file.exists()) {
    file.delete();
    }

    file.mkdir();
    return path + "chart-image/" + userId;
    }

    public static void main(String[] args) {
    delAndCreateSessionUser("zhao","123");
    }

    }

  • 相关阅读:
    学了axure的感受
    axure的功能
    PS的应用
    day15-1 模块
    day14-2 模块详解
    day14-1 模块定义,导入
    day13-1 Json & pickle 数据序列化
    day12-3 内置方法
    day12-2 内置方法
    day12-1 迭代器和生成器
  • 原文地址:https://www.cnblogs.com/lovezhaolei/p/3251094.html
Copyright © 2020-2023  润新知