Native ls

This commit is contained in:
Christoffer Lerno
2023-06-19 17:27:04 +02:00
committed by Christoffer Lerno
parent ab93389031
commit d5b01d3a8f
6 changed files with 73 additions and 41 deletions

10
resources/examples/ls.c3 Normal file
View File

@@ -0,0 +1,10 @@
import std::io;
fn void main()
{
Path path = path::getcwd()!!;
foreach (i, p : path::ls(path)!!)
{
io::printfn("%02d %s", i, p.as_str());
}
}