Module: system/storage-base-delete-file

The delete function is in its own module to underline the exceptional nature of removing files from ONE.

Source:

Methods

(async, static) deleteFile(filename, typeopt) → {Promise.<undefined>}

Parameters:
Name Type Attributes Default Description
filename string

The filename to be deleted

type StorageDirTypes <optional>
'objects'

This method removes an entry from storage. If the key does not exist, nothing happens, no error is thrown.

Note: There will be no error if the file to be deleted does not exist to begin with.

Source:
Throws:

Throws an Error if no filename is given

Type: Error

Returns:

Returns a promise that resolves with undefined.

Type: Promise.<undefined>