Interface FileStore

  • All Known Implementing Classes:
    MockFileStore

    public interface FileStore
    A file store interface.
    Author:
    Alex Bogdanovski [alex@erudika.com]
    • 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 path
        data - 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