Asserts that a target path is contained within a root by comparing canonical paths.
This function uses the filesystem's realPath capability to resolve symlinks and compare canonical paths, preventing symlink-based traversal attacks.
The filesystem to use for path resolution
The root directory (must be an absolute path)
The target path to check (must be an absolute path)
True if the target is contained within the root
If the target is not contained within the root or cannot be resolved
0.1.0
Asserts that a target path is contained within a root by comparing canonical paths.
This function uses the filesystem's realPath capability to resolve symlinks and compare canonical paths, preventing symlink-based traversal attacks.