1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-11 20:17:39 +00:00

Check the filesystem for isReadOnly (#1226)

This commit is contained in:
Drew Edwards
2022-11-25 20:40:40 +00:00
committed by GitHub
parent b8fce1eecc
commit 47816805fb
5 changed files with 111 additions and 2 deletions

View File

@@ -78,4 +78,15 @@ public interface IWritableMount extends IMount {
default OptionalLong getCapacity() {
return OptionalLong.empty();
}
/**
* Returns whether a file with a given path is read-only or not.
*
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprograms".
* @return If the file exists and is read-only.
* @throws IOException If an error occurs when checking whether the file is read-only.
*/
default boolean isReadOnly(String path) throws IOException {
return false;
}
}