Add touch utility
This commit is contained in:
parent
20f776b4bd
commit
049289f452
4 changed files with 20 additions and 5 deletions
10
touch.nim
Normal file
10
touch.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import cligen, os, times, streams
|
||||
import common
|
||||
|
||||
proc main(files:seq[string]) =
|
||||
for file in files:
|
||||
if not existsFile(file):
|
||||
discard newFileStream(file, fmWrite)
|
||||
setLastModificationTime(file, getTime())
|
||||
|
||||
dispatch(main, version=("version", nimbaseVersion))
|
||||
Loading…
Add table
Add a link
Reference in a new issue