Home / Function/ _mkdir_for_store() — langchain Function Reference

_mkdir_for_store() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  83113a73_3791_1847_70bf_78cc40d77ca4["_mkdir_for_store()"]
  26189a3b_3a87_0b57_a7a3_341b06895b61["LocalFileStore"]
  83113a73_3791_1847_70bf_78cc40d77ca4 -->|defined in| 26189a3b_3a87_0b57_a7a3_341b06895b61
  3a0a7a2c_34bc_b7f9_16d1_67eec3706628["mset()"]
  3a0a7a2c_34bc_b7f9_16d1_67eec3706628 -->|calls| 83113a73_3791_1847_70bf_78cc40d77ca4
  style 83113a73_3791_1847_70bf_78cc40d77ca4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/storage/file_system.py lines 89–102

    def _mkdir_for_store(self, dir_path: Path) -> None:
        """Makes a store directory path (including parents) with specified permissions.

        This is needed because `Path.mkdir()` is restricted by the current `umask`,
        whereas the explicit `os.chmod()` used here is not.

        Args:
            dir_path: The store directory to make.
        """
        if not dir_path.exists():
            self._mkdir_for_store(dir_path.parent)
            dir_path.mkdir(exist_ok=True)
            if self.chmod_dir is not None:
                dir_path.chmod(self.chmod_dir)

Domain

Subdomains

Called By

Frequently Asked Questions

What does _mkdir_for_store() do?
_mkdir_for_store() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/storage/file_system.py.
Where is _mkdir_for_store() defined?
_mkdir_for_store() is defined in libs/langchain/langchain_classic/storage/file_system.py at line 89.
What calls _mkdir_for_store()?
_mkdir_for_store() is called by 1 function(s): mset.

Analyze Your Own Codebase

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

Try Supermodel Free