FileStorage class can be derived from any IFileStorageAdapter.

Note the IFile instances created by the FileStorage class are serializable and deserializable, allowing them to be seamlessly transferred across different servers, processes, and databases. This can be done directly using ISerderRegister or indirectly through components that rely on ISerderRegister internally.

IMPORT_PATH: "@daiso-tech/core/file-storage"

Implements

Constructors

Accessors

Methods

Constructors

  • Parameters

    Returns FileStorage

    import { Serde } from "@daiso-tech/core/serde";
    import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/super-json-serde-adapter"
    import { FileStorag } from "@daiso-tech/core/file-storage";
    import { FsFileStorageAdapter } from "@daiso-tech/core/file-storage/fs-file-storage-adapter";

    const serde = new Serde(new SuperJsonSerdeAdapter());
    const fileStorageAdapter = new FsFileStorageAdapter();
    const fileStorage = new FileStorage({
    serde,
    adapter: fileStorageAdapter,
    })

Accessors

Methods