Tesselmax 46cc281099 Add py_Callbacks.open_file hook for embedder file-access policy
Adds an optional open_file callback to py_Callbacks, consulted before
script-reachable file operations:

  - io.FileIO(path, mode): called with the fopen mode string before the open
  - os.remove(path): called with the literal "delete"

Returning false rejects the operation and raises OSError; returning true
(or leaving the callback NULL, which is the default) allows it. Existing
embedders are unaffected -- the default is NULL and behavior is unchanged.

This lets an embedder enforce its own path policy using its own
canonicalization instead of reimplementing path checks inside the VM.
2026-07-16 12:51:12 -07:00
..
2025-06-07 01:34:15 +08:00