Preparing search index...

    Interface for safe file system operations within a specified directory

    interface IStorage {
        createFile(name: string, content: string | Uint8Array): Path;
        path: Path;
        readBytes(path: string | Path): Uint8Array;
        readFile(path: string | Path): string;
        unpackContent(archivePath: string | Path): Path;
    }

    Implemented by

    Index

    Properties

    path: Path

    Gets the path of the storage directory

    Methods

    • Creates a new file in the storage directory

      Parameters

      • name: string
      • content: string | Uint8Array

      Returns Path

    • Reads a file as a byte array

      Parameters

      Returns Uint8Array

    • Reads a file as a string

      Parameters

      Returns string

    • Unpacks a ZIP archive into the storage directory

      Parameters

      • archivePath: string | Path

      Returns Path