mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
19 lines
263 B
V
19 lines
263 B
V
import os
|
|
|
|
fn main() {
|
|
files := os.ls('.') or {
|
|
println(err)
|
|
return
|
|
}
|
|
mut f := os.create('file_list.txt') or {
|
|
println(err)
|
|
return
|
|
}
|
|
for file in files {
|
|
if os.is_file(file) {
|
|
f.write_string(file + '\r\n') or { println(err) }
|
|
}
|
|
}
|
|
f.close()
|
|
}
|