Home / Function/ __init__() — langchain Function Reference

__init__() — langchain Function Reference

Architecture documentation for the __init__() function in file_system.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f7109763_abb1_4a39_432a_903d925cc9ae["__init__()"]
  26189a3b_3a87_0b57_a7a3_341b06895b61["LocalFileStore"]
  f7109763_abb1_4a39_432a_903d925cc9ae -->|defined in| 26189a3b_3a87_0b57_a7a3_341b06895b61
  style f7109763_abb1_4a39_432a_903d925cc9ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/storage/file_system.py lines 39–63

    def __init__(
        self,
        root_path: str | Path,
        *,
        chmod_file: int | None = None,
        chmod_dir: int | None = None,
        update_atime: bool = False,
    ) -> None:
        """Implement the `BaseStore` interface for the local file system.

        Args:
            root_path: The root path of the file store. All keys are interpreted as
                paths relative to this root.
            chmod_file: Sets permissions for newly created files, overriding the
                current `umask` if needed.
            chmod_dir: Sets permissions for newly created dirs, overriding the
                current `umask` if needed.
            update_atime: 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.
        """
        self.root_path = Path(root_path).absolute()
        self.chmod_file = chmod_file
        self.chmod_dir = chmod_dir
        self.update_atime = update_atime

Domain

Subdomains

Frequently Asked Questions

What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/storage/file_system.py.
Where is __init__() defined?
__init__() is defined in libs/langchain/langchain_classic/storage/file_system.py at line 39.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free