hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/gils/touch.rv
blob: 5e27309e44861f648b3ed322ad21fc585030ab69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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 vfs:is_dir(path) do
    fail("touch: #{path}: is a directory\n")
  end else if vfs:size(path) < 0 do
    vfs:store(path, "")
  end
end