We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ef55f5 commit fd57021Copy full SHA for fd57021
base/path.jl
@@ -165,10 +165,17 @@ See also: [`basename`](@ref)
165
166
Get the file name part of a path.
167
168
+!!! note
169
+ This function differs slightly from the Unix `basename` program, where trailing slashes are ignored,
170
+ i.e. `\$ basename /foo/bar/` returns `bar`, whereas `basename` in Julia returns an empty string `""`.
171
+
172
# Examples
173
```jldoctest
174
julia> basename("/home/myuser/example.jl")
175
"example.jl"
176
177
+julia> basename("/home/myuser/")
178
+""
179
```
180
181
See also: [`dirname`](@ref)
0 commit comments