misc

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Filename = "-zipcomment.txt"

Variables

This section is empty.

Functions

func ExportName

func ExportName(path string) string

ExportName returns a text file path for the Export config.

func Self

func Self() (string, error)

Self returns the path for the zipcmt executable.

func Valid

func Valid(name string) bool

Valid checks that the named file is a known zip archive.

Types

type Export

type Export map[string]bool

func (Export) Find

func (e Export) Find(name string) string

Find searches for the name in the export map. If no matches exist, the name is unique and returned. Otherwise find attempts to append a `_1` suffix to the name. If the name already has this suffix, the digit is incrementally increased until a unique name is returned.

func (Export) Unique

func (e Export) Unique(zipPath, dest string) string

Unique checks the destination path against an export map. The map contains a unique collection of previously used destination paths, to avoid creating duplicate text filenames while using the SaveName config.

Jump to

Keyboard shortcuts

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