fs

package
v0.0.0-...-ce96b73 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Name string
	*FileSystemInfo
}

type File

type File struct {
	Name   string
	Digest string
}

func (*File) Base

func (f *File) Base() string

Returns the last element of the path. Trailing separators are removed. If the reference is nil or the file name is empty Base returns an empty string.

func (*File) Path

func (f *File) Path() string

Returns the Path of the file. If the reference is nil or the file name is empty Path returns an empty string.

type FileSlice

type FileSlice []File

func (FileSlice) Delete

func (files FileSlice) Delete(prefix string) FileSlice

Delete all files whose absolute path has the specified prefix.

func (FileSlice) Len

func (files FileSlice) Len() int

func (FileSlice) Less

func (files FileSlice) Less(i, j int) bool

func (FileSlice) Swap

func (files FileSlice) Swap(i, j int)

type FileSystemEntry

type FileSystemEntry struct {
	Name   string
	Reader io.Reader
}

type FileSystemInfo

type FileSystemInfo struct {
	Digest string
	Files  FileSlice
}

func FromIterator

func FromIterator(f FileSystemIterator) (*FileSystemInfo, error)

type FileSystemIterator

type FileSystemIterator interface {
	Next() (*FileSystemEntry, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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