file_history
file_history(path)
Input: path · Output: no output
What it is
The saved versions of path, newest first, as a table with columns version (the id), saved (UTC time) and bytes. Empty when there are none. Reading history works whether or not it is on.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
file_history(path) | path —not documented yet | not documented yet | Empty when there are none. Reading history works whether or not it is on. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
file_versioning(true)
write_text("notes.txt", "first draft")
write_text("notes.txt", "second draft") # "first draft" is kept
print(file_history("notes.txt"))
print(read_version("notes.txt", 1)) # first draft
restore_version("notes.txt", 1) # back to the first draft
not run by the build — this one needs something the repository cannot supply · from file-io