method Path.fileName
Last component (a/b.txt -> b.txt; / and the empty path -> empty).
Example:
use std.io { Path }
fn main() io {
print(Path.of("/src/main.oxl").fileName())
}Output
main.oxl
pub(api) fn fileName() -> strSince. 1.0.0-beta
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/io/io.oxl:895