Interface implemented by objects that can store values to files or directories.
Value storage handlers, as opposed to writers, encapsulate reading serialization and writing of a value to the file system (or wherever the underlying writer persists to). They also encapsulate the evaluation whether they can handle the value, so that the overall storage orchestration can query value storage handlers in order until one matches.
This library only contains value storage handlers for plain text, binary data and JSON files, plus directories of files/directories. Consumers can create their own handlers for additional formats.
Check whether this file value storer is able to store this value.
storeValue(pathInSource: string,destinationUrl: URL,value: unknown,options?: Readonly<ValueStorageHandlerOptions>,): Promise<void>
Asynchronously store (serialize and write) the contents to the file system at the specified URL. The exact serialization format depends on the implementation.
If the ValueStorageHandler
is associated with a specific file extension, it will add the extension
as it writes the file.