ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 组件源码 ``` /** * @category 创建文件目录 * @param filePath * 入参|指定目录|{@link java.lang.String} * @param flag * 入参|路径标识,0-相对路径,1-绝对路径|int * @return 0 失败<br/> * 1 成功<br/> */ @InParams(param = { @Param(name = "filePath", comment = "指定目录", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) @Component(label = "创建文件目录", style = "判断型", type = "同步组件", version = "1.0.0", deprecated = false, author = "test", date = "2018-01-16 03:01:50") public static ResultBase P_createDir(String filePath) { AppLog.debug("创建目录:{}", filePath); File dir = new File(filePath); if ((dir.exists() && dir.isDirectory()) || dir.mkdirs()) { return ResultBase.newSuccessResult(); } return ResultBase.newFailureResult("TPTF0001", "创建文件目录失败"); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/78/97/7897f6fb2c50046e6064fab5958035f3_1867x892.png) # 参数说明及示例 ## 入口参数 指定目录:目录要创建的绝对路径,示例: `"D:\\work\\CQYY\\workspace\\abc"`