hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/gils/touch.rv
blob: f8e3e188a2f517a9cfaeeb688a758305a745b83b (plain)
1
2
3
4
5
6
7
8
9
# dont touch my nono square

const context = env.ctx
if context.argv:len() < 2 do fail("usage: touch <path>\n") end
else do
  const path = expand_path(context.argv[1])
  if fs:is_dir(path) do fail("touch: #{path}: is a directory\n") end
  else if fs:size(path) < 0 do fs:store(path, "") end
end