mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-28 15:40:20 +00:00
Test filesystem api
* Invariant tests for the File interface * Invariant tests for reading / writing files ** Due to missing features currently ignoring CryptoFileSystem
This commit is contained in:
@@ -77,7 +77,16 @@ public interface File extends Node, Comparable<File> {
|
||||
Mover.move(this, destination);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Deletes the file if it exists.
|
||||
* <p>
|
||||
* Does nothign if the file does not exist.
|
||||
*/
|
||||
default void delete() {
|
||||
if (!exists()) {
|
||||
return;
|
||||
}
|
||||
try (WritableFile writableFile = openWritable()) {
|
||||
writableFile.delete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user