localfs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filesystem

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

func New

func New(ctx context.Context, opts ...Option) (*Filesystem, error)

New creates a new local filesystem with the given options.

func (*Filesystem) Create

func (fs *Filesystem) Create(name string) (ros.File, error)

func (*Filesystem) Mkdir

func (fs *Filesystem) Mkdir(name string, perm ros.FileMode) error

func (*Filesystem) MkdirAll

func (fs *Filesystem) MkdirAll(path string, perm ros.FileMode) error

func (*Filesystem) MkdirTemp

func (fs *Filesystem) MkdirTemp(dir, pattern string) (string, error)

func (*Filesystem) Open

func (fs *Filesystem) Open(name string) (ros.File, error)

func (*Filesystem) ReadDir

func (fs *Filesystem) ReadDir(name string) ([]ros.DirEntry, error)

func (*Filesystem) ReadFile

func (fs *Filesystem) ReadFile(name string) ([]byte, error)

func (*Filesystem) Remove

func (fs *Filesystem) Remove(name string) error

func (*Filesystem) RemoveAll added in v0.13.0

func (fs *Filesystem) RemoveAll(path string) error

func (*Filesystem) Rename

func (fs *Filesystem) Rename(oldpath, newpath string) error

func (*Filesystem) Stat

func (fs *Filesystem) Stat(name string) (ros.FileInfo, error)
func (fs *Filesystem) Symlink(oldname, newname string) error

func (*Filesystem) WriteFile

func (fs *Filesystem) WriteFile(name string, data []byte, perm ros.FileMode) error

type Option

type Option func(*Filesystem)

Option is a configuration function for a local Filesystem.

func WithBase

func WithBase(dir string) Option

WithBase sets the base directory for the filesystem.

Jump to

Keyboard shortcuts

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