From b9e709e3ede612995c422054fb56dfd8c12f85ad Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 8 Aug 2025 16:37:41 +0200 Subject: add UnaccessibleFileException --- src/main/kotlin/except/UnaccessibleFileException.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/kotlin/except/UnaccessibleFileException.kt (limited to 'src/main') diff --git a/src/main/kotlin/except/UnaccessibleFileException.kt b/src/main/kotlin/except/UnaccessibleFileException.kt new file mode 100644 index 0000000..23dce0d --- /dev/null +++ b/src/main/kotlin/except/UnaccessibleFileException.kt @@ -0,0 +1,10 @@ +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 that the client tried to access, up to 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: String) : Exception("Cannot access file ${path}.") \ No newline at end of file -- cgit v1.2.3