Skip to content

Commit

Permalink
add doc to std.fs.Path.base_name
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Nov 14, 2023
1 parent 467ab47 commit d1e5835
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/std/src/fs/Path.ri
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public struct Path {
return ".";
}

/// Returns the last element of path. Trailing path separators are removed before
/// extracting the last element. If the path is empty, base returns ".". If the
/// path consists entirely of separators, base returns a single separator.
public func base_name(path: string) -> string {
if path.is_empty() {
return "";
Expand Down

0 comments on commit d1e5835

Please sign in to comment.