From e779a9a74c0bbe1973601247b116334d1c7ffe68 Mon Sep 17 00:00:00 2001 From: Looly Date: Tue, 2 Nov 2021 01:33:15 +0800 Subject: [PATCH] add comment --- .../src/main/java/cn/hutool/core/io/FileUtil.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java b/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java index 4f234e9b4..c658db8cb 100644 --- a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java @@ -583,15 +583,15 @@ public class FileUtil extends PathUtil { * 创建文件及其父目录,如果这个文件存在,直接返回这个文件
* 此方法不对File对象类型做判断,如果File不存在,无法判断其类型 * - * @param fullFilePath 文件的全路径,使用POSIX风格 + * @param path 相对ClassPath的目录或者绝对路径目录,使用POSIX风格 * @return 文件,若路径为null,返回null * @throws IORuntimeException IO异常 */ - public static File touch(String fullFilePath) throws IORuntimeException { - if (fullFilePath == null) { + public static File touch(String path) throws IORuntimeException { + if (path == null) { return null; } - return touch(file(fullFilePath)); + return touch(file(path)); } /** @@ -2982,10 +2982,11 @@ public class FileUtil extends PathUtil { } /** - * 写数据到文件中 + * 写数据到文件中
+ * 文件路径如果是相对路径,则相对ClassPath * * @param data 数据 - * @param path 目标文件 + * @param path 相对ClassPath的目录或者绝对路径目录 * @return 目标文件 * @throws IORuntimeException IO异常 */