mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Native ls
This commit is contained in:
committed by
Christoffer Lerno
parent
ab93389031
commit
d5b01d3a8f
10
resources/examples/ls.c3
Normal file
10
resources/examples/ls.c3
Normal 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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user