evalution
    Preparing search index...

    Class LocalFileProvider

    A FileProvider backed by the local file system.

    Uses fs/promises for I/O, fs/promises.glob (Node.js ≥ 22) for pattern matching, and chokidar for file watching.

    This is the default implementation used by FilePromptProvider and TSPromptFileType when no custom provider is supplied.

    Implements

    Index

    Constructors

    Methods

    • Deletes the file at filePath. When the path falls inside an active watch scope, the watcher callback is invoked automatically with 'remove'.

      Parameters

      • filePath: string

      Returns Promise<void>

    • Dynamically imports the module at filePath and returns its namespace object. Rejects if the file does not exist.

      Parameters

      • filePath: string

      Returns Promise<any>

    • Reads the file at filePath and returns its content as a UTF-8 string. Rejects if the file does not exist.

      Parameters

      • filePath: string

      Returns Promise<string>

    • Writes content to filePath, creating or overwriting the file. When the path falls inside an active watch scope, the watcher callback is invoked automatically.

      Parameters

      • filePath: string
      • content: string

      Returns Promise<void>