ignorefs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ignorefs implements a wrapper that hides ignored files listed in '.kopiaignore' and in policies attached to directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dir fs.Directory, policyTree *policy.Tree, options ...Option) fs.Directory

New returns a fs.Directory that wraps another fs.Directory and hides files specified in the ignore dotfiles.

Types

type IgnoreCallback

type IgnoreCallback func(path string, metadata fs.Entry)

IgnoreCallback is a function called by ignorefs to report whenever a file or directory is being ignored while listing its parent.

type Option

type Option func(parentContext *ignoreContext)

Option modifies the behavior of ignorefs.

func ReportIgnoredFiles

func ReportIgnoredFiles(f IgnoreCallback) Option

ReportIgnoredFiles returns an Option causing ignorefs to call the provided function whenever a file or directory is ignored.

Jump to

Keyboard shortcuts

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