The add method adds the file as bytes when key doesn't exists. Returns true when key doesn't exists otherwise false will be returned.
The addStream method adds the file as streaming when key doesn't exists. Returns true when key doesn't exists otherwise false will be returned.
The copy methods copies the source file to the given destination when it doesnt exists.
Returns
FILE_WRITE_ENUM.SUCCESS when file successfully copied.FILE_WRITE_ENUM.NOT_FOUND when source file is not found.FILE_WRITE_ENUM.KEY_EXISTS when destination file already exists.The copyAndReplace methods copies the source file to the given destination. The destination file will always be replaces.
Returns true if the source is found otherwise false is returned.
The getMetaData method returns the file metadata when key is found otherwise null will be returned.
The getStream method returns the file as stream when key is found otherwise null will be returned.
The move methods moves the source file to the given destination when it doesnt exists.
Returns
FILE_WRITE_ENUM.SUCCESS when file successfully moved.FILE_WRITE_ENUM.NOT_FOUND when source file is not found.FILE_WRITE_ENUM.KEY_EXISTS when destination file already exists.The moveAndReplace methods moves the source file to the given destination. The destination file will always be replaces.
Returns true if the source is found otherwise false is returned.
The put methods upsert the given key with file bytes.
Returns true when the key was updated otherwise false is returned.
The putStream methods upsert the given key with file stream.
Returns true when the key was updated otherwise false is returned.
The update method updates the file by bytes. Returns true if the key where updated otherwise false will be returned.
The updateStream method updates the file by stream. Returns true if the key where updated otherwise false will be returned.
The
IFileStorageAdaptercontract defines a way for storing files independent of storage.IMPORT_PATH:
"@daiso-tech/core/file-storage/contracts"