file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package file implements a Gatherer for local filesystem sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSMetadata

type FSMetadata struct {
	URI       string
	Path      string
	Size      int64
	Timestamp string
}

FSMetadata holds metadata about a gathered filesystem resource.

func (FSMetadata) Get

func (f FSMetadata) Get() interface{}

Get returns the FSMetadata value.

func (FSMetadata) GetPinnedURL

func (f FSMetadata) GetPinnedURL(u string) (string, error)

GetPinnedURL returns a deterministic file:: URL for the given path.

type FileGatherer

type FileGatherer struct{}

FileGatherer gathers resources from local file paths.

func (*FileGatherer) Gather

func (f *FileGatherer) Gather(ctx context.Context, src, dst string) (metadata.Metadata, error)

Gather copies a local file or directory from src to dst.

func (*FileGatherer) Matcher

func (f *FileGatherer) Matcher(uri string) bool

Matcher returns true if the URI looks like a local file path.

type FileSaver

type FileSaver struct{}

FileSaver copies files between filesystem locations.

Jump to

Keyboard shortcuts

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