Skip to content

Commit

Permalink
add two refs to file docs (JuliaLang#21845)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and tkelman committed May 14, 2017
1 parent f6bd5fe commit bd28e02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Get the directory part of a path.
```jldoctest
julia> dirname("/home/myuser")
"/home"
See also: [`basename`](@ref)
```
"""
dirname(path::AbstractString) = splitdir(path)[1]
Expand All @@ -152,6 +154,8 @@ Get the file name part of a path.
julia> basename("/home/myuser/example.jl")
"example.jl"
```
See also: [`dirname`](@ref)
"""
basename(path::AbstractString) = splitdir(path)[2]

Expand Down

0 comments on commit bd28e02

Please sign in to comment.