hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/gils/touch.rv
blob: 3032e9609b4d916df12684b4b270fdd7c7d128b7 (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 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