Skip to content

Commit 93e65d5

Browse files
add lstat to Node.FS.Aff (#85)
1 parent 687a771 commit 93e65d5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Breaking changes:
99

1010
New features:
1111

12+
- Add `lstat` to `Node.FS.Aff` (#85 by @artemisSystem)
13+
1214
Bugfixes:
1315

1416
Other improvements:

src/Node/FS/Aff.purs

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module Node.FS.Aff
1010
, chown
1111
, chmod
1212
, stat
13+
, lstat
1314
, link
1415
, symlink
1516
, readlink
@@ -147,6 +148,12 @@ chmod = toAff2 A.chmod
147148
stat :: FilePath -> Aff Stats
148149
stat = toAff1 A.stat
149150

151+
-- | Gets file or symlink statistics. `lstat` is identical to `stat`, except
152+
-- | that if the `FilePath` is a symbolic link, then the link itself is stat-ed,
153+
-- | not the file that it refers to.
154+
lstat :: FilePath -> Aff Stats
155+
lstat = toAff1 A.lstat
156+
150157
-- |
151158
-- | Creates a link to an existing file.
152159
-- |

0 commit comments

Comments
 (0)