Adds tests for API

This commit is contained in:
Guillaume Tâche
2024-08-09 21:18:47 +02:00
parent 155b011c2b
commit 428edcd806
17 changed files with 515 additions and 41 deletions

View File

@@ -5,10 +5,20 @@ import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
/**
* Represents a file
*/
public interface File {
/**
* @return The file input stream
* @throws IOException If an I/O error occurs
*/
default InputStream getInputStream() throws IOException {
return Files.newInputStream(path());
}
/**
* @return The file path
*/
Path path();
}