file

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package file provides archive interface for local directories/files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete added in v0.1.4

func Delete(dir string, files []string) (err error)

func List added in v0.1.4

func List(dir string) (files []string, err error)

Types

type FileArchive added in v0.1.4

type FileArchive struct {
	common.BasicArchive
}

FileArchive embeds a BasicArchive with some additional attributes

func NewArchive added in v0.1.4

func NewArchive(outDir, prefix, extension string, options ...func(*common.BasicArchive) error) (rf *FileArchive, err error)

NewArchive creates a new recorder file (for writing). The caller must call `rf.Close()` on the resulting handle to close out the file. File is atomically renamed to the final name only after everything is flushed to disk and file is closed. `*FileArchive` returned is an io.Writer

func OpenArchive added in v0.1.4

func OpenArchive(fileName string, bufferSize int) (rf *FileArchive, err error)

OpenArchive opens an archive file for reading. `*FileArchive` returned is an io.Reader

Jump to

Keyboard shortcuts

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