• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..18-Dec-2021-

bin/H03-May-2022-

node_modules/nopt/H18-Dec-2021-246194

LICENSEH A D18-Dec-2021748 1612

README.mdH A D18-Dec-2021946 4329

package.jsonH A D18-Dec-2021719 3332

README.md

1# node-touch
2
3For all your node touching needs.
4
5## Installing
6
7```bash
8npm install touch
9```
10
11## CLI Usage:
12
13See `man touch`
14
15This package exports a binary called `nodetouch` that works mostly
16like the unix builtin `touch(1)`.
17
18## API Usage:
19
20```javascript
21var touch = require("touch")
22```
23
24Gives you the following functions:
25
26* `touch(filename, options, cb)`
27* `touch.sync(filename, options)`
28* `touch.ftouch(fd, options, cb)`
29* `touch.ftouchSync(fd, options)`
30
31## Options
32
33* `force` like `touch -f` Boolean
34* `time` like `touch -t <date>` Can be a Date object, or any parseable
35  Date string, or epoch ms number.
36* `atime` like `touch -a` Can be either a Boolean, or a Date.
37* `mtime` like `touch -m` Can be either a Boolean, or a Date.
38* `ref` like `touch -r <file>` Must be path to a file.
39* `nocreate` like `touch -c` Boolean
40
41If neither `atime` nor `mtime` are set, then both values are set.  If
42one of them is set, then the other is not.
43