- fixed bug in compiler (rare)
- added lyng.io.fs (multiplatform) - CLI tools now have access to the filesystem
This commit is contained in:
1 parent
41746f22e5
commit
438e48959e
28 files changed
+2137
-6
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/env lyng
|
||||
|
||||
import lyng.io.fs
|
||||
import lyng.stdlib
|
||||
|
||||
val files = Path("../..").list().toList()
|
||||
val longestNameLength = files.maxOf { it.name.length }
|
||||
|
||||
val format = "%-"+(longestNameLength+1) +"s %d"
|
||||
for( f in files ) {
|
||||
var name = f.name
|
||||
if( f.isDirectory() ) name += "/"
|
||||
println( format(name, f.size()) )
|
||||
}
|
||||
Reference in new issue
Block a user