diff options
| author | hachem <im@hachem.wtf> | 2026-10-11 02:16:56 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-11 02:16:56 +0200 |
| commit | 59794d0b999e544a94230d9562bf2b99d2ed74c7 (patch) | |
| tree | a001db5b5ebb9453d6a0e96f56b36e6ec3ccdd51 /gils/wc.rv | |
| parent | 88750ed7132c08bcfb24e878c893ef7185c3c0b0 (diff) | |
feat: actual real vfs, not a faked one lmao
Diffstat (limited to 'gils/wc.rv')
| -rw-r--r-- | gils/wc.rv | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5,12 +5,12 @@ if context.argv:len() < 2 do fail("usage: wc <path>\n") end else do const path = expand_path(context.argv[1]) - const size = fs:size(path) + const size = vfs:size(path) if size < 0 do fail("wc: #{path}: no such file\n") end else do - const contents = if (size > 0) fs:read_bytes(path, 0, size) else "" + const contents = if (size > 0) vfs:read_bytes(path, 0, size) else "" let line_count = 0 let word_count = 0 let in_word = :false |
