Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

touch(1) for node

branch: master


latest commit 327b6b39cb
Isaac Z. Schlueter authored
Octocat-spinner-32 bin executable October 05, 2011
Octocat-spinner-32 test sanity test October 05, 2011
Octocat-spinner-32 LICENSE isc license January 24, 2014
Octocat-spinner-32 specify installing July 10, 2013
Octocat-spinner-32 package.json v0.0.3 January 24, 2014
Octocat-spinner-32 touch.js main module October 05, 2011


For all your node touching needs.


npm install touch

CLI Usage:

See man touch

API Usage:

var touch = require("touch")

Gives you the following functions:

  • touch(filename, options, cb)
  • touch.sync(filename, options)
  • touch.ftouch(fd, options, cb)
  • touch.ftouchSync(fd, options)


  • force like touch -f Boolean
  • time like touch -t <date> Can be a Date object, or any parseable Date string, or epoch ms number.
  • atime like touch -a Can be either a Boolean, or a Date.
  • mtime like touch -m Can be either a Boolean, or a Date.
  • ref like touch -r <file> Must be path to a file.
  • nocreate like touch -c Boolean

If neither atime nor mtime are set, then both values are set. If one of them is set, then the other is not.

Something went wrong with that request. Please try again.