Package ch.epfl.cs107.play.io
Interface FileSystem
- All Known Implementing Classes:
DefaultFileSystem,FolderFileSystem,ResourceFileSystem,ZipFileSystem
public interface FileSystem
Represents a simple file system, where each file is associated to a unique name.
-
Method Summary
Modifier and TypeMethodDescriptionOpen an existing file for read.Open file for write, previous content overwritten if any.
-
Method Details
-
read
Open an existing file for read.- Parameters:
name- (String): unique identifier, not null- Returns:
- (InputStream): content stream, not null
- Throws:
IOException- if file cannot be open for read
-
write
Open file for write, previous content overwritten if any.- Parameters:
name- (String): unique identifier, not null- Returns:
- (InputStream): content stream, not null
- Throws:
IOException- if file cannot be open for write
-