-
- All Known Implementing Classes:
MockFileStore
public interface FileStoreA file store interface.- Author:
- Alex Bogdanovski [alex@erudika.com]
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandelete(String path)Deletes a file.InputStreamload(String path)Loads a file from a storage service.Stringstore(String path, InputStream data)Saves a file to a storage service.
-
-
-
Method Detail
-
load
InputStream load(String path)
Loads a file from a storage service.- Parameters:
path- the relative file path- Returns:
- the file stream or null if not found
-
store
String store(String path, InputStream data)
Saves a file to a storage service.- Parameters:
path- the relative file pathdata- the contents of the file- Returns:
- the full path to the file or the URL, null if unsuccessful
-
delete
boolean delete(String path)
Deletes a file.- Parameters:
path- the relative file path- Returns:
- true if successful
-
-