Skip to content

script-utils/fs

Contains utility functions for file system operations.

FunctionDescription
readdirPosixReads the contents of a directory and converts file paths or buffer results to POSIX format.
TypeDescription
BufferResultOptionsOptions for controlling the format of the result when returning buffers. directory is used instead of folder to preserve compatibility with node:fs module.
DirentResultOptionsOptions for controlling the format of the result when returning Dirent objects.
StringResultOptionsOptions for controlling the format of the result when returning strings.