Methods

dirΒΆ

dir(dirname:Str, subtype:Any=false)

List directory contents. Warning: "." and ".." are included. Throws DirFail when directory can not be listed.
Source: stdlib.ngs:2789

subtype

Select type of returned items: true for Path sub-type, false for Path type

Returns

Arr of Path or it's sub-type

Example

dir("tmp/v8", true).filter(File)  # [ ..., <File path=tmp/v8/README.md fd=null>, <File path=tmp/v8/LICENSE.valgrind fd=null>, ... ]
dir("tmp/v8", true).filter(Dir)   # [ ..., <Dir path=tmp/v8/tools>, <Dir path=tmp/v8/infra>, ... ]