LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicstoragefile_systemLocalFileStore
    Class●Since v1.0

    LocalFileStore

    BaseStore interface that works on the local file system.

    Copy
    LocalFileStore(
      self,
      root_path: str | Path,
      *,
      chmod_file: int | None = None,
      chmod_dir: int | None = None,
      update_atime: bool = False
    )

    Bases

    ByteStore

    Used in Docs

    • Embedding model integrations
    • LocalFileStore integration

    Parameters

    NameTypeDescription
    root_path*str | Path

    The root path of the file store. All keys are interpreted as paths relative to this root.

    chmod_fileint | None
    Default:None

    Sets permissions for newly created files, overriding the current umask if needed.

    chmod_dirint | None
    Default:None

    Sets permissions for newly created dirs, overriding the current umask if needed.

    update_atimebool
    Default:False

    Updates the filesystem access time (but not the modified time) when a file is read. This allows MRU/LRU cache policies to be implemented for filesystems where access time updates are disabled.

    Constructors

    constructor
    __init__
    NameType
    root_pathstr | Path
    chmod_fileint | None
    chmod_dirint | None
    update_atimebool

    Attributes

    attribute
    root_path
    attribute
    chmod_file: chmod_file
    attribute
    chmod_dir: chmod_dir
    attribute
    update_atime: update_atime

    Methods

    method
    mget

    Get the values associated with the given keys.

    method
    mset

    Set the values for the given keys.

    method
    mdelete

    Delete the given keys and their associated values.

    method
    yield_keys

    Get an iterator over keys that match the given prefix.

    View source on GitHub