(36 lines)
1 '\" t2 .\" Copyright (c) 2026 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH Path.components 3 2026-04-27 "Tomo man-pages"6 .SH NAME7 Path.components \- Get the components of a path8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI Path.components\ :\ func(path:\ Path\ ->\ [Text])13 .fi14 .SH DESCRIPTION15 Returns a list of the file components of a path.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx23 l l l.24 Name Type Description25 path Path The path of the file or directory.26 .TE27 .SH RETURN28 Each of the file components of the path in a list. Note: for absolute paths, the first component will be "/". Trailing slashes are ignored.30 .SH EXAMPLES31 .EX32 assert (./foo/baz.txt).components() == [".", "foo", "baz.txt"]33 assert (/absolute/path/).components() == ["/", "absolute", "path"]34 .EE35 .SH SEE ALSO36 .BR Tomo-Path (3)