Validate a caller-supplied local file path against the server's filesystem
policy and return a safe absolute path to use. Throws FileAccessError when
access is disabled or the path escapes the sandbox root.
read: the file must exist; its real path (symlinks resolved) must be
inside the root.
write: the file need not exist yet, but its resolved path and nearest
existing ancestor must both be inside the root, so symlinked ancestors
can't redirect the write outside.
Validate a caller-supplied local file path against the server's filesystem policy and return a safe absolute path to use. Throws FileAccessError when access is disabled or the path escapes the sandbox root.
read: the file must exist; its real path (symlinks resolved) must be inside the root.write: the file need not exist yet, but its resolved path and nearest existing ancestor must both be inside the root, so symlinked ancestors can't redirect the write outside.