...

Command txtar-c

The txtar-c command archives a directory tree as a txtar archive printed to standard output.

Usage:

txtar-c /path/to/dir >saved.txtar

See https://godoc.org/golang.org/x/tools/txtar for details of the format and how to parse a txtar file.