Comment by yencabulator
7 months ago
The first example[1] has a classic look-before-you-leap stupidity. That's not a great look!
match File.exists(f) {
...
match File.stat(f) {
The file can be removed after the first call, before the second. Just call stat and handle ENOENT correctly.
[1]: The page seems to randomize which one is shown. I got the "File information" one in the dropdown.
No comments yet
Contribute on Hacker News ↗