dirsource

package
v0.0.0-...-238917c Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package dirsource implements the file.Source interface for filesystem directories.

It is only appropriate for using in tests and demo mode at this time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirSource

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

DirSource implements the file.Source interface using a filesystem directory.

Caveats: Currently only walks the directory and emits a file.File for each file found. It does not watch the directory for changes. It also uses modified time in place of created time. This implementation is only useful for tests and demo mode.

func New

func New(dir string) (*DirSource, error)

New return a new instance of DirSource.

func (*DirSource) Start

func (d *DirSource) Start(_ context.Context) (<-chan file.File, error)

Start implements the file.Source interface.

Jump to

Keyboard shortcuts

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