about summary refs log tree commit diff
path: root/readme.md
blob: 734e81fac30d0edb2f708a8d5c73443c074a9489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
```
Usage: whenwasit [options] PATH
```

little thing meant to be called in a git-hook as to keep track of
file creation and modification dates, which are important to me.
dumps csv output on stdout, errors abort with a panic.

You can use the flag `--ignore` to stop it from descending into
directories. The flag takes a path to a file that contains a list
of directory to ignore, relative to the path given to whenwasit.

**CSV Output Defintion:**  
data is output on `stdout` in a CSV format. because there are
varying ways to make a CSV, it's described in detail below.

- there is no data header; the first row is data
- the data rows are in the format `path,btime,mtime,atime`
	- `path`: file path relative to the root that was provided on the command line
	- `btime`: time of file creation; birth time
	- `mtime`: time file was last modified
	- `atime`: time file was last accessed
- if the `path` contains a comma (`,`) or a backslash (`\`), it is escape with a backslash
- if any one of the time cannot be attained, the field is left empty.

**behavior:**  
prints a row for the current directory, a row for each file, and
then goes into each directory recursively.

this results in reading the directory twice as to not cache the
directory listings in memory.