importer

package
v0.4.24-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backends

func Backends() []string

func Register

func Register(name string, backend func(string) (ImporterBackend, error))

Types

type ChildEntry

type ChildEntry struct {
	Name string
	Stat objects.FileInfo
}

type FileAttributes

type FileAttributes struct {
	IsHidden    bool // Hidden file attribute (Windows, Linux)
	IsSystem    bool // System file attribute (Windows)
	IsReadonly  bool // Read-only attribute
	IsArchive   bool // Archive attribute (Windows)
	IsTemporary bool // Temporary file (Windows)
}

type Importer

type Importer struct {
	// contains filtered or unexported fields
}

func NewImporter

func NewImporter(location string) (*Importer, error)

func (*Importer) Close

func (importer *Importer) Close() error

func (*Importer) NewReader

func (importer *Importer) NewReader(pathname string) (io.ReadCloser, error)

func (*Importer) Origin

func (importer *Importer) Origin() string

func (*Importer) Root

func (importer *Importer) Root() string

func (*Importer) Scan

func (importer *Importer) Scan() (<-chan ScanResult, error)

func (*Importer) Type

func (importer *Importer) Type() string

type ImporterBackend

type ImporterBackend interface {
	Origin() string
	Type() string
	Root() string
	Scan() (<-chan ScanResult, error)
	NewReader(pathname string) (io.ReadCloser, error)
	Close() error
}

type RecordType

type RecordType int8
const (
	RecordTypeFile      RecordType = 0
	RecordTypeDirectory RecordType = 1
	RecordTypeSymlink   RecordType = 2
	RecordTypeDevice    RecordType = 3
	RecordTypePipe      RecordType = 4
	RecordTypeSocket    RecordType = 5
)

type ScanError

type ScanError struct {
	Pathname string
	Err      error
}

type ScanRecord

type ScanRecord struct {
	Type               RecordType
	Pathname           string
	Target             string
	Stat               objects.FileInfo
	Children           []objects.FileInfo
	ExtendedAttributes map[string][]byte
	FileAttributes     []string
	User               string
	Group              string
}

type ScanResult

type ScanResult interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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