2 ms·
I'm not a Lua user but is this a falsiness issue? local function report(result) print(result ?? "The value was nil.") end report(filesize("/path/to/file/o
by Lerc 1y ago
I'm not a Lua user but is this a falsiness issue?
local function report(result)
print(result ?? "The value was nil.")
end
report(filesize("/path/to/file/of/length/zero"))
If filesize returns nil for file-not-found and the length otherwise. Wouldn't coalescing work and or would not be able to identify existing but empty files.