Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiFileJail.ToVirtual

function ToVirtual(const aPhysical: string; out aVirtual: string): Boolean;
The reverse mapping: an ABSOLUTE physical path back to the slash-rooted virtual path a peer sees. Refuses a relative path rather than anchoring it on the process current directory. Performs no filesystem I/O and so discloses nothing about what exists. THIS IS NOT A CONTAINMENT TEST AND MUST NOT BE USED AS ONE. It is a lexical string mapping, for logging and for building a redirect. It compares against the pinned root's reported path, which on a platform whose descriptor-to-path lookup fell back to a name-based resolution is not necessarily the path of the descriptor actually held. The ONLY containment decision in this unit is the verdict from OpenVerified.