Skip to content

Commit

Permalink
feat: add lstat
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 28, 2025
1 parent 133d602 commit c9e96da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ export const stat = quansync({
> &
QuansyncFn<Stats | BigIntStats, [path: PathLike, opts?: StatOptions]>

export const lstat = quansync({
sync: (path: PathLike, options) => fs.lstatSync(path, options),
async: (path, options) => fs.promises.lstat(path, options),
}) as typeof stat

/**
* @link https://nodejs.org/api/fs.html#fspromisescpsrc-dest-options
*/
Expand Down

0 comments on commit c9e96da

Please sign in to comment.