JanetDocsPlaygroundI'm feeling luckyGitHub sign in

os/touch



    cfunction
    src/core/os.c on line 1563, column 1

    (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
cellularmitosisPlayground
# 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
cellularmitosisPlayground