Package io.github.jbastgen.stemma.app.io
package io.github.jbastgen.stemma.app.io
Interaction with the operating system and the file system: opening files and folders, external tools and terminals, the web
browser, the trash, copies of opened files, log files, PDF writing and image helpers.
-
ClassDescriptionStarts an external merge tool for a conflicting file: the three versions are written to files in the configuration folder (never to a system temp folder), the command line of the settings is filled in and run without a shell, and the merged result is expected in the working-tree file.The files a tool is given.The programs listed in Settings → Integration → Tools (feature 13): every tool adds Open in <name> to the context menu of a file.One tool.Shows a repository, a folder or a file in the system's file manager (Explorer, Finder, the Files application of the Linux desktop).The second way: ask the desktop.The operating systems that have their own way to show a file.The outcome of
FileManager.show(io.github.jbastgen.stemma.app.io.FileManager.Os, java.nio.file.Path, java.lang.String, java.lang.String, io.github.jbastgen.stemma.app.io.FileManager.Runner, io.github.jbastgen.stemma.app.io.FileManager.Fallback):messagesays what went wrong whenokis false.Starts a command.What to show: a path that exists, and whether it is a file (to be selected) or a folder (to be opened).Opens a file with the program the operating system has for it (feature 12):open,xdg-openorrundll32 url.dll,FileProtocolHandler, thenjava.awt.Desktop.Which files the diff view shows as pictures (feature 56): the formats JavaFX can decode.One version of a picture file.The two versions the view compares; either isnullwhen the file does not exist on that side.Removes old daily log files.Finding, reading and searching the daily log files (stemma-YYYY-MM-DD.log) for the log page of the About dialog.What was read.The lines that contain the search text, without regard to case; all lines when it is blank.Which log: the one of the application, or the one of the requests to AI services.Which lines of the log to show: all, those of level info and above, or only warnings and errors.Copies of files from old commits that were opened with the system's program (feature 12).Writes a PDF whose pages are pictures (JPEG): the page of the document looks exactly like what was drawn, in every script, and no font has to be embedded.Opens a terminal in a folder (feature 11).What to run.Starts a command in a folder.A terminal program Stemma knows how to start in a folder.Moves a file to the operating system's trash instead of deleting it, where there is one.Opens a web address in the user's default browser.The second way: ask the desktop.