Package io.github.jbastgen.stemma.app.io
Class OpenedFiles
java.lang.Object
io.github.jbastgen.stemma.app.io.OpenedFiles
Copies of files from old commits that were opened with the system's program (feature 12). They are written below
opened in Stemma's configuration folder (never to a system temp folder, ADR 0007), read-only because they are
a look at the past and not a place to work, and removed when Stemma ends and, after a crash, when it starts.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidRemoves all copies (the read-only flag is taken off first, where a system needs that to delete).static Pathroot()The folder for the copies.static PathWrites the file as it was in the commit to<root>/<first 12 of the commit id>/<path>: the real name and extension are kept, so the system finds the right program for it.
-
Method Details
-
root
The folder for the copies. -
write
public static Path write(Path root, String commitId, String path, byte[] content) throws IOException Writes the file as it was in the commit to<root>/<first 12 of the commit id>/<path>: the real name and extension are kept, so the system finds the right program for it.- Throws:
IOException
-
deleteAll
Removes all copies (the read-only flag is taken off first, where a system needs that to delete).
-