JanetDocsI'm feeling luckyGithub sign in

os/touch



    cfunction

    (os/touch path &opt actime modtime)
    
    Update the access time and modification times for a file. By default,
    sets times to the current time.


2 examplesSign in to add an example
Loading...
(os/shell "touch foo")
(os/stat "foo" :modified)  # => 1593836002
(os/touch "foo")
(os/stat "foo" :modified)  # => 1593836013
cellularmitosis
# note that os/touch does not create a file if it does not yet exist.
(os/touch "foo")
error: No such file or directory
  in os/touch
  in _thunk [repl] (tailcall) on line 2, column 1
cellularmitosis