Help us shape the future of Go! Take the 2026 Go Developer Survey

engine

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Root7zCmd string = "7z"

Functions

func Build7zArgs

func Build7zArgs(src []string, outputDir string, customName string, format string, level string, method string, dictSize string, wordSize, blockSize string, threads, update string, sfx bool, shared bool, split string, enc bool, pass string, encName bool) []string

func CheckDependencies

func CheckDependencies(w fyne.Window)

func ExtractArchive

func ExtractArchive(archivePath, destDir, password string, targets ...string) error

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

func ExtractArchiveItems(items []domain.ClipboardItem) (map[string]string, string, error)

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

func GetFullCmdPath(appname string, w fyne.Window) string

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

func IsPasswordProtected(archive string) bool

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

func ParseHashesFromLog(allLines []string) map[string]string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL