readdirPosix
Reads the contents of a directory and converts file paths or buffer results to POSIX format.
Import:
import { readdirPosix } from 'obsidian-dev-utils/script-utils/fs';Signature:
function readdirPosix(path: PathLike, options: BufferResultOptions | DirentResultOptions | StringResultOptions): Promise<string[] | Buffer<ArrayBufferLike>[] | Dirent<string>[]>Parameters:
| Parameter | Type | Description |
|---|---|---|
path | PathLike | The path to the directory. |
options | BufferResultOptions | DirentResultOptions | StringResultOptions | Options to control the format of the result. |
Returns: Promise<string[] | Buffer<ArrayBufferLike>[] | Dirent<string>[]> — A Promise that resolves with an array of POSIX-formatted file paths, buffers, or Dirent objects.