From 7341ead2aade10ea1b833e94275277658741883a Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Mon, 18 Aug 2025 21:09:11 +0200 Subject: switch to multi-module project structure --- lib/src/main/kotlin/except/UnaccessibleFileException.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/src/main/kotlin/except/UnaccessibleFileException.kt (limited to 'lib/src/main/kotlin/except/UnaccessibleFileException.kt') diff --git a/lib/src/main/kotlin/except/UnaccessibleFileException.kt b/lib/src/main/kotlin/except/UnaccessibleFileException.kt new file mode 100644 index 0000000..07d5d13 --- /dev/null +++ b/lib/src/main/kotlin/except/UnaccessibleFileException.kt @@ -0,0 +1,11 @@ +package except + +/** + * This exception is thrown when the file that the client is trying to open (or walk through, in case of a directory) + * cannot be accessed. + * + * @param path The path, as a list of path elements, that the client tried to access, up to and including the first + * element that cannot be accessed (e.g. if the path the user wants to access is `["usr", "foo", "bar", "zib"]` but + * `bar` does not exist, then [path] must be `["usr", "foo", "bar"]`). + */ +class UnaccessibleFileException(val path: List) : Exception("Could not walk to file ${path.joinToString(separator = "/")}.") \ No newline at end of file -- cgit v1.2.3