MCPcopy
hub / github.com/marimo-team/marimo / is_file_path

Function is_file_path

marimo/_cli/cli_validators.py:53–62  ·  view source on GitHub ↗
(ctx: Any, param: Any, value: str | None)

Source from the content-addressed store, hash-verified

51
52
53def is_file_path(ctx: Any, param: Any, value: str | None) -> str:
54 del ctx
55 del param
56 if not value:
57 raise click.BadParameter("Must be a file path")
58 if not Path(value).exists():
59 raise click.BadParameter(f"File does not exist: {value}")
60 if not Path(value).is_file():
61 raise click.BadParameter(f"Not a file: {value}")
62 return value

Calls 2

is_fileMethod · 0.80
existsMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…