pub fn sanitize_path(path: impl AsRef<Path>) -> StringExpand description
Turn any path that gets passed in into something WASI can use.
In general, this means…
- Use “/” everywhere
- Remove “.” or “..” components
- Make the path absolute because when loaded it’ll be absolute with respect to the volume
- Get rid of any UNC path stuff