From 4c0683138a1e4e7bc49cc72267aa08dd556db081 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Fri, 17 May 2024 01:34:49 -0400 Subject: [PATCH] update resource helper javadoc --- .../util/resourcehelper/ResourceHelper.java | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java index c8d5edb..fbb395f 100644 --- a/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java +++ b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java @@ -141,8 +141,13 @@ public static void createNewFile(Path directory, String fileName) { *

* calls {@link ResourceHelper#validateFilePath(Path)} * - * @throws ContractException {@link ResourceError#FILE_PATH_IS_DIRECTORY} if the - * file path refers to a directory + * @throws ContractException + *

*/ public static Path validateFile(String file) { Path filePath = Path.of(file); @@ -155,8 +160,13 @@ public static Path validateFile(String file) { /** * Given a file path, validates that the file exists. * - * @throws ContractException {@link ResourceError#FILE_PATH_IS_DIRECTORY} if the - * file path refers to a directory + * @throws ContractException + * */ public static Path validateFile(Path filePath) { File file = filePath.toFile(); @@ -173,7 +183,7 @@ public static Path validateFile(Path filePath) { } /** - * Given a file path, validates that the file exists. + * Given a file path, validates that the file path exists. *

* calls {@link ResourceHelper#validateFilePath(Path)} * @@ -189,7 +199,7 @@ public static Path validateFilePath(String file) { } /** - * Given a file path, validates that the file exists. + * Given a file path, validates that the file path exists. * * @throws ContractException {@link ResourceError#FILE_PATH_IS_DIRECTORY} if the * file path refers to a directory @@ -209,7 +219,7 @@ public static Path validateFilePath(Path filePath) { } /** - * Given a directory path, validates that the directory exists. + * Given a directory path, validates that the directory path exists. *

* calls {@link ResourceHelper#validateDirectoryPath(Path)} * @@ -225,7 +235,9 @@ public static Path validateDirectoryPath(String directory) { } /** - * Given a directory path, validates that the directory exists. + * Given a directory path, validates that the directory path exists. + *

+ * If it does not exists, attempts to create it * * @throws ContractException {@link ResourceError#DIRECTORY_PATH_IS_FILE} if the * directory path refers to a file @@ -256,9 +268,7 @@ protected static URI getURI(URL url) { } /** - * Given a file, attempts to create the file - * - * package access for testing + * Given a file, attempts to create the file package access for testing */ static void _createFile(File file) { try {