filesystem

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 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 LocalFileSystem

type LocalFileSystem struct {
	paths.LocalFilePath
}

FS implements the fs.FS interface.

func NewLocalFileSystem

func NewLocalFileSystem() *LocalFileSystem

func (*LocalFileSystem) CountDirContents

func (*LocalFileSystem) CountDirContents(name string) (int, error)

CountDirContents: returns the number of files/directories direnctly under a given directory

func (*LocalFileSystem) Open

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

Open opens the named object for reading.

func (*LocalFileSystem) ReadDir

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

ReadDir reads the directory and returns a list of DirEntry.

func (*LocalFileSystem) ReadLink(name string) (string, error)

ReadLink returns the destination of the named symbolic link. If there is an error, it will be of type *os.PathError.

func (*LocalFileSystem) Stat

func (*LocalFileSystem) Stat(name string) (fs.FileInfo, error)

Stat returns a FileInfo for the given name.

func (*LocalFileSystem) UserHomeDir

func (*LocalFileSystem) UserHomeDir() (string, error)

UserHomeDir returns the current user's home directory.

func (*LocalFileSystem) WorkDir

func (*LocalFileSystem) WorkDir() string

WorkDir returns the path of working directory

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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