chdir

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chdirfs

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

func New

func New(backend afero.Fs) *Chdirfs

func (*Chdirfs) Chdir

func (c *Chdirfs) Chdir(dir string) error

func (*Chdirfs) Chmod

func (c *Chdirfs) Chmod(name string, mode os.FileMode) error

Chmod changes the mode of the named file to mode.

func (*Chdirfs) Chtimes

func (c *Chdirfs) Chtimes(name string, atime time.Time, mtime time.Time) error

Chtimes changes the access and modification times of the named file

func (*Chdirfs) Create

func (c *Chdirfs) Create(name string) (afero.File, error)

Create creates a file in the filesystem, returning the file and an error, if any happens.

func (*Chdirfs) Mkdir

func (c *Chdirfs) Mkdir(name string, perm os.FileMode) error

Mkdir creates a directory in the filesystem, return an error if any happens.

func (*Chdirfs) MkdirAll

func (c *Chdirfs) MkdirAll(path string, perm os.FileMode) error

MkdirAll creates a directory path and all parents that does not exist yet.

func (*Chdirfs) Name

func (c *Chdirfs) Name() string

The name of this FileSystem

func (*Chdirfs) Open

func (c *Chdirfs) Open(name string) (afero.File, error)

Open opens a file, returning it or an error, if any happens.

func (*Chdirfs) OpenFile

func (c *Chdirfs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

OpenFile opens a file using the given flags and the given mode.

func (*Chdirfs) Remove

func (c *Chdirfs) Remove(name string) error

Remove removes a file identified by name, returning an error, if any happens.

func (*Chdirfs) RemoveAll

func (c *Chdirfs) RemoveAll(path string) error

RemoveAll removes a directory path and any children it contains. It does not fail if the path does not exist (return nil).

func (*Chdirfs) Rename

func (c *Chdirfs) Rename(oldname string, newname string) error

Rename renames a file.

func (*Chdirfs) Stat

func (c *Chdirfs) Stat(name string) (os.FileInfo, error)

Stat returns a FileInfo describing the named file, or an error, if any happens.

Jump to

Keyboard shortcuts

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