method IFileSystem.realPath
IFileSystem.realPath(path: string): Promise<string>

Resolves a path to its canonical absolute form, following symlinks.

Optional: absent on runtimes/adapters that cannot canonicalize paths. Callers MUST degrade gracefully when it is not provided (e.g. fall back to lexical containment) — see the static-asset handler in the React Router plugin, which uses it for symlink-safe containment when available.

Parameters

path: string

File path

Return Type

Promise<string>

The canonical absolute path

Usage

import { type IFileSystem } from "common/src/index.ts";