Node fs.readlink function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
readlinkNreadlink
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
readlinkNreadlink
namespace
fs.readlinkfunction
readlink(path:
PathLike,options:
EncodingOption,callback: (err: null | ErrnoException, linkString: string) => void): void;
Reads the contents of the symbolic link referred to by path. The callback gets two arguments (err, linkString).
See the POSIX readlink(2) documentation for more details.
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 link path passed to the callback. If the encoding is set to 'buffer', the link path returned will be passed as a Buffer object.
function
readlink(path:
PathLike,options:
BufferEncodingOption,callback: (err: null | ErrnoException, linkString: NonSharedBuffer) => void): void;
Asynchronous readlink(2) - read value of a symbolic link.
@param path
A path to a file. If a URL is provided, it must use the file: protocol.
@param options
The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.
function
readlink(path:
PathLike,options:
EncodingOption,callback: (err: null | ErrnoException, linkString: string | NonSharedBuffer) => void): void;
Asynchronous readlink(2) - read value of a symbolic link.
@param path
A path to a file. If a URL is provided, it must use the file: protocol.
@param options
The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.
function
readlink(path:
PathLike,callback: (err: null | ErrnoException, linkString: string) => void): void;
Asynchronous readlink(2) - read value of a symbolic link.
@param path
A path to a file. If a URL is provided, it must use the file: protocol.
namespace
readlinkResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →