normalizeWasiPath
normalizeWasiPath(
path):string
Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:343
Canonicalize a guest path the way the store demands: absolute, no ./.., no empty or repeated
separator, no trailing slash. Deliberately lenient in the same places a WASI host has to be —
wasi-libc hands preopen-RELATIVE paths, but an absolute one is accepted too, and a trailing NUL from
a fixed-size buffer is stripped rather than rejected.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string