Product Site

5.4.8.2. listRoots (Class Method)

Returns the file system root elements, as an array of strings. On Windows, each of the drives is a root element in the format d:\. On Unix-like systems, there is just one root ( / ).
Example 5.242. File class
say .File~listRoots~toString(, " ")   -- C:\ D:\ E:\ R:\ (e. g. on Windows)
say .File~listRoots~toString(, " ")   -- / (Unix-like system)