function native | Node.js fs module | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
realpath/
nativeFnative
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
realpath/
nativeFnative
function
fs.realpath.nativefunction
native(path:
PathLike,options:
EncodingOption,callback: (err: null | ErrnoException, resolvedPath: string) => void): void;
Asynchronous realpath(3).
The callback gets two arguments (err, resolvedPath).
Only paths that can be converted to UTF8 strings are supported.
The optional options argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the path passed to the callback. If the encoding is set to 'buffer', the path returned will be passed as a Buffer object.
On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on /proc in order for this function to work. Glibc does not have this restriction.
function
native(path:
PathLike,options:
BufferEncodingOption,callback: (err: null | ErrnoException, resolvedPath: NonSharedBuffer) => void): void;
Asynchronous realpath(3).
The callback gets two arguments (err, resolvedPath).
Only paths that can be converted to UTF8 strings are supported.
The optional options argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the path passed to the callback. If the encoding is set to 'buffer', the path returned will be passed as a Buffer object.
On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on /proc in order for this function to work. Glibc does not have this restriction.
function
native(path:
PathLike,options:
EncodingOption,callback: (err: null | ErrnoException, resolvedPath: string | NonSharedBuffer) => void): void;
Asynchronous realpath(3).
The callback gets two arguments (err, resolvedPath).
Only paths that can be converted to UTF8 strings are supported.
The optional options argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the path passed to the callback. If the encoding is set to 'buffer', the path returned will be passed as a Buffer object.
On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on /proc in order for this function to work. Glibc does not have this restriction.
function
native(path:
PathLike,callback: (err: null | ErrnoException, resolvedPath: string) => void): void;
Asynchronous realpath(3).
The callback gets two arguments (err, resolvedPath).
Only paths that can be converted to UTF8 strings are supported.
The optional options argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the path passed to the callback. If the encoding is set to 'buffer', the path returned will be passed as a Buffer object.
On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on /proc in order for this function to work. Glibc does not have this restriction.
Referenced typestype
PathLike = string |
Buffer |
URLValid types for path values in "fs".
type
EncodingOption =
ObjectEncodingOptions | BufferEncoding | undefined | nulltype
BufferEncodingOption = 'buffer' | { encoding: 'buffer' }
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →