Skip to content

add lstat to Node.FS.Aff #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Breaking changes:

New features:

- Add `lstat` to `Node.FS.Aff` (#85 by @artemisSystem)

Bugfixes:

Other improvements:
Expand Down
7 changes: 7 additions & 0 deletions src/Node/FS/Aff.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Node.FS.Aff
, chown
, chmod
, stat
, lstat
, link
, symlink
, readlink
Expand Down Expand Up @@ -147,6 +148,12 @@ chmod = toAff2 A.chmod
stat :: FilePath -> Aff Stats
stat = toAff1 A.stat

-- | Gets file or symlink statistics. `lstat` is identical to `stat`, except
-- | that if the `FilePath` is a symbolic link, then the link itself is stat-ed,
-- | not the file that it refers to.
lstat :: FilePath -> Aff Stats
lstat = toAff1 A.lstat

-- |
-- | Creates a link to an existing file.
-- |
Expand Down
Loading