hosanna-ui-docs - v0.9.0
    Preparing search index...

    Interface IHosannaFileSystem

    Interface representing a file system for managing files.

    interface IHosannaFileSystem {
        clear(): void;
        deleteFile(path: string): boolean;
        fileExists(path: string): boolean;
        getAllFileNames(): string[];
        readFile(path: string): null | string;
        renameFile(oldPath: string, newPath: string): boolean;
        writeFile(path: string, data: string): void;
    }
    Index

    Methods

    • Deletes a file.

      Parameters

      • path: string

        The path to the file.

      Returns boolean

      True if the file was successfully deleted, false otherwise.

    • Reads the content of a file.

      Parameters

      • path: string

        The path to the file.

      Returns null | string

      The file content as a string, or null if the file does not exist.

    • Renames a file.

      Parameters

      • oldPath: string

        The current path of the file.

      • newPath: string

        The new path for the file.

      Returns boolean

      True if the file was successfully renamed, false otherwise.