storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS provides an os directory as a filesystem.

func OpenOS

func OpenOS(root string) FS

OpenOS opens os directory as FS.

func Private

func Private() FS

Private returns the private keysets filesystem.

func Public

func Public() FS

Public returns the public keysets filesystem.

func RootFS

func RootFS() FS

RootFS returns the root filesystem.

func (FS) ChangeDir

func (f FS) ChangeDir(name string) FS

ChangeDir creates a new FS with relative root.

func (FS) Create

func (f FS) Create(name string) (*os.File, error)

Create calls os.Create relatively FS`s root.

func (FS) Mkdir

func (f FS) Mkdir(name string, perm fs.FileMode) error

Mkdir calls os.Mkdir relatively FS`s root.

func (FS) MkdirAll

func (f FS) MkdirAll(path string, perm fs.FileMode) error

MkdirAll calls os.MkdirAll relatively FS`s root.

func (FS) Open

func (f FS) Open(name string) (*os.File, error)

Open calls os.Open relatively FS`s root.

func (FS) OpenFile

func (f FS) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)

OpenFile calls os.OpenFile relatively FS`s root.

func (FS) ReadDir

func (f FS) ReadDir(name string) ([]os.DirEntry, error)

ReadDir calls os.ReadDir relatively FS`s root.

func (f FS) Readlink(name string) (string, error)

Readlink calls os.Readlink relatively FS`s root.

func (FS) Remove

func (f FS) Remove(name string) error

Remove calls os.Remove relatively FS`s root.

func (FS) Stat

func (f FS) Stat(name string) (os.FileInfo, error)

Stat calls os.Stat relatively FS`s root.

func (f FS) Symlink(oldname, newname string) error

Symlink calls os.Symlink relatively FS`s root.

Jump to

Keyboard shortcuts

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