file_versioning
result = file_versioning([on])
Input: on · Output: result
What it is
Turns file history on (true) or off (false) for the rest of the run; with no argument, changes nothing.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = file_versioning([on]) | on optionalnot documented yet | result — | Returns the previous setting as a Bool. |
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