Skip to content

Commit 800512a

Browse files
oxinaboxfredrikekre
authored andcommitted
doc: improve docstring for ispath (JuliaLang#31267)
1 parent 776ddce commit 800512a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

base/stat.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ ctime(st::StatStruct) = st.ctime
151151
"""
152152
ispath(path) -> Bool
153153
154-
Return `true` if `path` is a valid filesystem path, `false` otherwise.
154+
Return `true` if a valid filesystem entity exists at `path`,
155+
otherwise returns `false`.
156+
This is the generalization of [`isfile`](@ref), [`isdir`](@ref) etc.
155157
"""
156158
ispath(st::StatStruct) = filemode(st) & 0xf000 != 0x0000
157159

@@ -182,6 +184,8 @@ true
182184
julia> isdir("not/a/directory")
183185
false
184186
```
187+
188+
See also: [`isfile`](@ref) and [`ispath`](@ref).
185189
"""
186190
isdir(st::StatStruct) = filemode(st) & 0xf000 == 0x4000
187191

@@ -209,6 +213,8 @@ true
209213
210214
julia> close(f); rm("test_file.txt")
211215
```
216+
217+
See also: [`isdir`](@ref) and [`ispath`](@ref).
212218
"""
213219
isfile(st::StatStruct) = filemode(st) & 0xf000 == 0x8000
214220

0 commit comments

Comments
 (0)