flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 95: Get file size
Idiom # 95: Get file size
See
programming-idioms.org
:
Code
io.file.stat.size path
What are effects?
Running Example
ex95 is path := "path/to/file" stats := io.file.stat match stats.size path size i64 => say "the size of $path is $size" # logic in case of success err error => say err # error handling
What are effects?
next: Idiom # 96: Check string prefix