@samatawy/rules
    Preparing search index...

    Interface UsesFileSystem

    interface UsesFileSystem {
        withFS(fs: __module): this;
        loadFileSystem(): Promise<any>;
    }

    Implemented by

    Index

    Methods

    • Provide a node file system module to be used for reading files. This method or the equivalent loadFileSystem() must be called before attempting to read files in a Node environment.

      Parameters

      • fs: __module

        the node fs module to use.

      Returns this

      the current instance for chaining.

    • Dynamically import the Node.js file system module in a Node environment. This method or the equivalent withFS() must be called before attempting to read files in a Node environment. In a browser environment, this method will log an error since file system access is not supported.

      Returns Promise<any>

      the imported fs module if successful, otherwise undefined.