Skip to main content

SUPPORTED_PATH_METHODS

Constant SUPPORTED_PATH_METHODS 

Source
pub const SUPPORTED_PATH_METHODS: &str = "  Monty implements only this subset of `pathlib.Path` (any other method raises AttributeError):
    - Read/query (any mount): `exists()`, `is_file()`, `is_dir()`, `is_symlink()`, `read_text()`, `read_bytes()`, `stat()`, `iterdir()`, `resolve()`, `absolute()`, `open(\"r\")`.
    - Write (read-write mounts only): `write_text(s)`, `write_bytes(b)`, `append_text(s)`, `append_bytes(b)`, `mkdir(parents=False, exist_ok=False)`, `unlink()`, `rmdir()`, `rename(target)`, `open(\"w\")`/`open(\"a\")`.
    - Pure path ops (no I/O, always available): the `/` operator and `joinpath(...)`, `is_absolute()`, `with_name()`, `with_stem()`, `with_suffix()`, `as_posix()`, and the properties `.name`, `.parent`, `.stem`, `.suffix`, `.suffixes`, `.parts`.
";
Expand description

The exact pathlib.Path surface Monty implements, listed for the model when any path is mounted (anything else raises AttributeError).

Hand-maintained against the monty release pinned in Cargo.toml (0.0.21) — re-check this list whenever that pin is bumped, or the prompt silently drifts from interpreter behavior. Public so other Monty integrations (adk-codeact-monty) render the same list from the same source.