MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / _mode

Function _mode

mitmproxy/addons/save.py:34–39  ·  view source on GitHub ↗

Extract the writing mode (overwrite or append) from a path spec

(path: str)

Source from the content-addressed store, hash-verified

32
33@lru_cache
34def _mode(path: str) -> Literal["ab", "wb"]:
35 """Extract the writing mode (overwrite or append) from a path spec"""
36 if path.startswith("+"):
37 return "ab"
38 else:
39 return "wb"
40
41
42class Save:

Callers 2

saveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…