fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 144: Check if file exists
Idiom # 144: Check if file exists
See
programming-idioms.org
:
Code
io.file.stat.exists path
What are effects?
Running Example
ex144 is path := "path/to/file" match io.file.stat path true md io.file.meta_data => say "$path exists: $md" # logic in case of success error => say "an error happened when trying to stat: $path" # error handling logic
What are effects?
last changed: 2024-07-01
next: NYI: Idiom # 145: Print log line with datetime