Skip to content

Commit

Permalink
docs: isfile: direct write instead of IO (#45261)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored May 11, 2022
1 parent b612159 commit 72794c7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions base/stat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,17 @@ Return `true` if `path` is a regular file, `false` otherwise.
julia> isfile(homedir())
false
julia> f = open("test_file.txt", "w");
julia> filename = "test_file.txt";
julia> isfile(f)
julia> write(filename, "Hello world!");
julia> isfile(filename)
true
julia> close(f); rm("test_file.txt")
julia> rm(filename);
julia> isfile(filename)
false
```
See also [`isdir`](@ref) and [`ispath`](@ref).
Expand Down

0 comments on commit 72794c7

Please sign in to comment.