localfs

package
v0.0.0-...-e2c53ed Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

go:build linux && amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLevelScanner

func NewLevelScanner(path string, openwait time.Duration) filewalk.LevelScanner

Types

type Option

type Option func(o *options)

func WithScannerOpenWait

func WithScannerOpenWait(d time.Duration) Option

type T

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

T represents the local filesystem. It implements FS, ObjectFS and filewalk.FS

func New

func New(opts ...Option) *T

NewLocalFS returns an instance of file.FS that provides access to the local filesystem.

func (*T) Base

func (f *T) Base(path string) string

func (*T) Delete

func (f *T) Delete(_ context.Context, path string) error

func (*T) DeleteAll

func (f *T) DeleteAll(_ context.Context, path string) error

func (*T) EnsurePrefix

func (f *T) EnsurePrefix(_ context.Context, path string, perm fs.FileMode) error

func (*T) Get

func (f *T) Get(_ context.Context, path string) ([]byte, error)

func (*T) IsNotExist

func (f *T) IsNotExist(err error) bool

func (*T) IsPermissionError

func (f *T) IsPermissionError(err error) bool

func (*T) Join

func (f *T) Join(components ...string) string

func (*T) LevelScanner

func (f *T) LevelScanner(prefix string) filewalk.LevelScanner

func (*T) Lstat

func (f *T) Lstat(_ context.Context, path string) (file.Info, error)

func (*T) Open

func (f *T) Open(name string) (fs.File, error)

func (*T) OpenCtx

func (f *T) OpenCtx(_ context.Context, name string) (fs.File, error)

func (*T) Put

func (f *T) Put(_ context.Context, path string, perm fs.FileMode, data []byte) error

func (*T) ReadFile

func (f *T) ReadFile(name string) ([]byte, error)

func (*T) ReadFileCtx

func (f *T) ReadFileCtx(_ context.Context, name string) ([]byte, error)
func (f *T) Readlink(_ context.Context, path string) (string, error)

func (*T) Scheme

func (f *T) Scheme() string

func (*T) Stat

func (f *T) Stat(_ context.Context, path string) (file.Info, error)

func (*T) SysXAttr

func (f *T) SysXAttr(existing any, merge file.XAttr) any

func (*T) XAttr

func (f *T) XAttr(_ context.Context, name string, info file.Info) (file.XAttr, error)

Jump to

Keyboard shortcuts

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