depot

package
v0.0.0-...-ee15bc8 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package depot implements file processing routines to archive, store, and maintain data in a wide variety of archive formats.

Supported archive formats are;

7z
tar.bz2
tar.gz
rar
zip
zipx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	Pack(string) // Create an archive
	Unpack()     // Unpack existing archive
	Move()       // Move an archive
	Verify()     // Verify integrity of an archive
}

type Zip

type Zip struct {
	Name  string   // output name
	Files []string // files/directories to add to the archive
	// contains filtered or unexported fields
}

func (*Zip) Pack

func (z *Zip) Pack(directory string) error

Pack zips files in zip.Files into the provided directory. It preserves the full directory structure.

TODO: Once database is set up, we need to store the file's MD5 checksum, and location data.

func (*Zip) Verify

func (z *Zip) Verify()

TODO: Assess the need for type-specific behaviour. Verify is part of the Archive interface for this reason.

Jump to

Keyboard shortcuts

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