langchain.js
    Preparing search index...

    Specific implementation of the BaseFileStore class for Node.js. Provides methods to read and write files in a specific base path.

    Hierarchy

    • BaseFileStore
      • NodeFileStore
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • basePath: string = ...

      Returns NodeFileStore

    Properties

    basePath: string = ...
    lc_namespace: string[] = ...

    Methods

    • Reads the contents of a file at the given path.

      Parameters

      • path: string

        Path of the file to read.

      Returns Promise<string>

      The contents of the file as a string.

    • Writes the given contents to a file at the specified path.

      Parameters

      • path: string

        Path of the file to write to.

      • contents: string

        Contents to write to the file.

      Returns Promise<void>

      Promise that resolves when the file has been written.