Documentation
¶
Index ¶
- Variables
- func Build7zArgs(src []string, outputDir string, customName string, format string, level string, ...) []string
- func CheckDependencies(w fyne.Window)
- func ExtractArchive(archivePath, destDir, password string, targets ...string) error
- func ExtractArchiveItems(items []domain.ClipboardItem) (map[string]string, string, error)
- func GetArchiveDestination(sources []string, outputDir string, format string, customName string, sfx bool) string
- func GetFullCmdPath(appname string, w fyne.Window) string
- func GetFullLogText() string
- func GetLogLines() []string
- func IsPasswordProtected(archive string) bool
- func ListArchive(archivePath, password string) ([]domain.ArchiveItem, bool, error)
- func ParseHashesFromLog(allLines []string) map[string]string
- func ParseSLTOutput(outStr, archivePath string) ([]domain.ArchiveItem, bool, error)
- func ProcessLogByte(b byte)
- func StartOperation(target string, args []string, mode string, workingDir string, w fyne.Window, ...)
- func UpdateConsoleLog(text string)
Constants ¶
This section is empty.
Variables ¶
var Root7zCmd string = "7z"
Functions ¶
func Build7zArgs ¶
func CheckDependencies ¶
func ExtractArchive ¶
ExtractArchive is the centralized extraction function for any archive format. For double-compressed tarballs (e.g., .tar.gz), it pipelines two 7-Zip subprocesses in memory using an io.Pipe: uncompressing the outer wrapper to stdout, and streaming it directly into the inner tar extractor. Attaches an empty Reader to Stdin to prevent processes from hanging if an archive requires input.
func ExtractArchiveItems ¶
ExtractArchiveItems extracts clipboard entries situated inside virtual archives into temporary disk staging locations. Returns a mapping of original virtual paths to their temporary local disk paths, the temporary directory path itself, and any error encountered.
func GetArchiveDestination ¶
func GetArchiveDestination(sources []string, outputDir string, format string, customName string, sfx bool) string
GetArchiveDestination calculates the full target path for the archive. Used in ui_compress and the build7zArgs arguments.
func GetFullCmdPath ¶
use this for 7zzs that sits beside our binary
func GetFullLogText ¶
func GetFullLogText() string
getFullLogText returns the assembled console logs thread-safely.
func GetLogLines ¶
func GetLogLines() []string
getLogLines returns a thread-safe copy of all completed log lines plus the active line.
func IsPasswordProtected ¶
IsPasswordProtected tests if the archive requires a password for extraction.
func ListArchive ¶
func ListArchive(archivePath, password string) ([]domain.ArchiveItem, bool, error)
ListArchive retrieves detailed metadata from an archive using 7-Zip's SLT flag `-slt`. Returns error explicitly if tarball pipeline decompression fails instead of falling back to outer Gzip header.
func ParseHashesFromLog ¶
ParseHashesFromLog scans log outputs and isolates algorithm results.
func ParseSLTOutput ¶
func ParseSLTOutput(outStr, archivePath string) ([]domain.ArchiveItem, bool, error)
ParseSLTOutput parses key-value structured text emitted by `7z l -slt`. Preserves deliberate leading/trailing whitespace in property values (e.g. filenames).
func ProcessLogByte ¶
func ProcessLogByte(b byte)
processLogByte builds the console log stream exactly as a terminal does
func StartOperation ¶
func StartOperation(target string, args []string, mode string, workingDir string, w fyne.Window, onSuccess func())
StartOperation executes a 7-Zip command with context-based cancellation and custom working directories.
func UpdateConsoleLog ¶
func UpdateConsoleLog(text string)
updateConsoleLog updates the log text and positions the entry cursor at the very row, forcing Fyne's native scroll viewport to go to the bottom.
Types ¶
This section is empty.