@@ -153,7 +153,9 @@ readUtf8 = \path ->
153
153
# Path.read (Path.fromStr path) fmt
154
154
155
155
## Returns true if the path exists on disk and is pointing at a directory.
156
- ## Any error will return false.
156
+ ## Returns `Task.ok false` if the path exists and it is not a directory. If the path does not exist,
157
+ ## this function will return `Task.err PathErr PathDoesNotExist`.
158
+ ##
157
159
## This uses [rust's std::path::is_dir](https://doc.rust-lang.org/std/path/struct.Path.html#method.is_dir).
158
160
##
159
161
## > [Path.isDir] does the same thing, except it takes a [Path] instead of a [Str].
@@ -162,7 +164,9 @@ isDir = \path ->
162
164
Path . isDir (Path . fromStr path)
163
165
164
166
## Returns true if the path exists on disk and is pointing at a regular file.
165
- ## Any error will return false.
167
+ ## Returns `Task.ok false` if the path exists and it is not a file. If the path does not exist,
168
+ ## this function will return `Task.err PathErr PathDoesNotExist`.
169
+ ##
166
170
## This uses [rust's std::path::is_file](https://doc.rust-lang.org/std/path/struct.Path.html#method.is_file).
167
171
##
168
172
## > [Path.isFile] does the same thing, except it takes a [Path] instead of a [Str].
@@ -171,7 +175,9 @@ isFile = \path ->
171
175
Path . isFile (Path . fromStr path)
172
176
173
177
## Returns true if the path exists on disk and is pointing at a symbolic link.
174
- ## Any error will return false.
178
+ ## Returns `Task.ok false` if the path exists and it is not a symbolic link. If the path does not exist,
179
+ ## this function will return `Task.err PathErr PathDoesNotExist`.
180
+ ##
175
181
## This uses [rust's std::path::is_symlink](https://doc.rust-lang.org/std/path/struct.Path.html#method.is_symlink).
176
182
##
177
183
## > [Path.isSymLink] does the same thing, except it takes a [Path] instead of a [Str].
0 commit comments