osshim

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 123

Documentation

Overview

This file was generated by counterfeiter with command: counterfeiter -p -o /Users/pivotal/workspace/local-volume-release/src/code.cloudfoundry.org/goshims/osshim os BUT THEN WE MODIFIED IT SO MAKE SURE TO COPY THOSE MODIFICATIONS FORWARDS

This file was generated by counterfeiter with command: counterfeiter -p -o /Users/pivotal/workspace/local-volume-release/src/code.cloudfoundry.org/goshims/osshim os BUT THEN WE MODIFIED IT SO MAKE SURE TO COPY THOSE MODIFICATIONS FORWARDS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	Name() string
	Fd() uintptr
	Close() error
	Stat() (os.FileInfo, error)
	Read(b []byte) (n int, err error)
	ReadAt(b []byte, off int64) (n int, err error)
	Write(b []byte) (n int, err error)
	WriteAt(b []byte, off int64) (n int, err error)
	Seek(offset int64, whence int) (ret int64, err error)
	WriteString(s string) (n int, err error)
	Chdir() error
}

type FileShim

type FileShim struct {
	Delegate *os.File
}

func (*FileShim) Chdir

func (f *FileShim) Chdir() error

func (*FileShim) Close

func (f *FileShim) Close() error

func (*FileShim) Fd

func (f *FileShim) Fd() uintptr

func (*FileShim) Name

func (f *FileShim) Name() string

func (*FileShim) Read

func (f *FileShim) Read(b []byte) (n int, err error)

func (*FileShim) ReadAt

func (f *FileShim) ReadAt(b []byte, off int64) (n int, err error)

func (*FileShim) Seek

func (f *FileShim) Seek(offset int64, whence int) (ret int64, err error)

func (*FileShim) Stat

func (f *FileShim) Stat() (os.FileInfo, error)

func (*FileShim) Write

func (f *FileShim) Write(b []byte) (n int, err error)

func (*FileShim) WriteAt

func (f *FileShim) WriteAt(b []byte, off int64) (n int, err error)

func (*FileShim) WriteString

func (f *FileShim) WriteString(s string) (n int, err error)

type Os

type Os interface {
	FindProcess(pid int) (*os.Process, error)
	StartProcess(name string, argv []string, attr *os.ProcAttr) (*os.Process, error)
	Hostname() (name string, err error)
	Expand(s string, mapping func(string) string) string
	ExpandEnv(s string) string
	Getenv(key string) string
	LookupEnv(key string) (string, bool)
	Setenv(key, value string) error
	Unsetenv(key string) error
	Clearenv()
	Environ() []string
	NewSyscallError(syscall string, err error) error
	IsExist(err error) bool
	IsNotExist(err error) bool
	IsPermission(err error) bool
	Getpid() int
	Getppid() int
	Mkdir(name string, perm os.FileMode) error
	Chdir(dir string) error
	Open(name string) (File, error)
	Create(name string) (File, error)
	Rename(oldpath, newpath string) error
	NewFile(fd uintptr, name string) File
	OpenFile(name string, flag int, perm os.FileMode) (File, error)
	Truncate(name string, size int64) error
	Remove(name string) error
	Chmod(name string, mode os.FileMode) error
	Chtimes(name string, atime time.Time, mtime time.Time) error
	Pipe() (r File, w File, err error)
	Link(oldname, newname string) error
	Symlink(oldname, newname string) error
	Readlink(name string) (string, error)
	Chown(name string, uid, gid int) error
	Lchown(name string, uid, gid int) error
	TempDir() string
	Stat(name string) (os.FileInfo, error)
	Lstat(name string) (os.FileInfo, error)
	Getwd() (dir string, err error)
	MkdirAll(path string, perm os.FileMode) error
	RemoveAll(path string) error
	IsPathSeparator(c uint8) bool
	Getuid() int
	Geteuid() int
	Getgid() int
	Getegid() int
	Getgroups() ([]int, error)
	Exit(code int)
	Getpagesize() int
	SameFile(fi1, fi2 os.FileInfo) bool
}

type OsShim

type OsShim struct{}

func (*OsShim) Chdir

func (sh *OsShim) Chdir(dir string) error

func (*OsShim) Chmod

func (sh *OsShim) Chmod(name string, mode os.FileMode) error

func (*OsShim) Chown

func (sh *OsShim) Chown(name string, uid int, gid int) error

func (*OsShim) Chtimes

func (sh *OsShim) Chtimes(name string, atime time.Time, mtime time.Time) error

func (*OsShim) Clearenv

func (sh *OsShim) Clearenv()

func (*OsShim) Create

func (sh *OsShim) Create(name string) (File, error)

func (*OsShim) Environ

func (sh *OsShim) Environ() []string

func (*OsShim) Exit

func (sh *OsShim) Exit(code int)

func (*OsShim) Expand

func (sh *OsShim) Expand(s string, mapping func(string) string) string

func (*OsShim) ExpandEnv

func (sh *OsShim) ExpandEnv(s string) string

func (*OsShim) FindProcess

func (sh *OsShim) FindProcess(pid int) (*os.Process, error)

func (*OsShim) Getegid

func (sh *OsShim) Getegid() int

func (*OsShim) Getenv

func (sh *OsShim) Getenv(key string) string

func (*OsShim) Geteuid

func (sh *OsShim) Geteuid() int

func (*OsShim) Getgid

func (sh *OsShim) Getgid() int

func (*OsShim) Getgroups

func (sh *OsShim) Getgroups() ([]int, error)

func (*OsShim) Getpagesize

func (sh *OsShim) Getpagesize() int

func (*OsShim) Getpid

func (sh *OsShim) Getpid() int

func (*OsShim) Getppid

func (sh *OsShim) Getppid() int

func (*OsShim) Getuid

func (sh *OsShim) Getuid() int

func (*OsShim) Getwd

func (sh *OsShim) Getwd() (dir string, err error)

func (*OsShim) Hostname

func (sh *OsShim) Hostname() (name string, err error)

func (*OsShim) IsExist

func (sh *OsShim) IsExist(err error) bool

func (*OsShim) IsNotExist

func (sh *OsShim) IsNotExist(err error) bool

func (*OsShim) IsPathSeparator

func (sh *OsShim) IsPathSeparator(c uint8) bool

func (*OsShim) IsPermission

func (sh *OsShim) IsPermission(err error) bool

func (*OsShim) Lchown

func (sh *OsShim) Lchown(name string, uid int, gid int) error
func (sh *OsShim) Link(oldname string, newname string) error

func (*OsShim) LookupEnv

func (sh *OsShim) LookupEnv(key string) (string, bool)

func (*OsShim) Lstat

func (sh *OsShim) Lstat(name string) (os.FileInfo, error)

func (*OsShim) Mkdir

func (sh *OsShim) Mkdir(name string, perm os.FileMode) error

func (*OsShim) MkdirAll

func (sh *OsShim) MkdirAll(path string, perm os.FileMode) error

func (*OsShim) NewFile

func (sh *OsShim) NewFile(fd uintptr, name string) File

func (*OsShim) NewSyscallError

func (sh *OsShim) NewSyscallError(syscall string, err error) error

func (*OsShim) Open

func (sh *OsShim) Open(name string) (File, error)

func (*OsShim) OpenFile

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

func (*OsShim) Pipe

func (sh *OsShim) Pipe() (File, File, error)
func (sh *OsShim) Readlink(name string) (string, error)

func (*OsShim) Remove

func (sh *OsShim) Remove(name string) error

func (*OsShim) RemoveAll

func (sh *OsShim) RemoveAll(path string) error

func (*OsShim) Rename

func (sh *OsShim) Rename(oldpath string, newpath string) error

func (*OsShim) SameFile

func (sh *OsShim) SameFile(fi1 os.FileInfo, fi2 os.FileInfo) bool

func (*OsShim) Setenv

func (sh *OsShim) Setenv(key string, value string) error

func (*OsShim) StartProcess

func (sh *OsShim) StartProcess(name string, argv []string, attr *os.ProcAttr) (*os.Process, error)

func (*OsShim) Stat

func (sh *OsShim) Stat(name string) (os.FileInfo, error)
func (sh *OsShim) Symlink(oldname string, newname string) error

func (*OsShim) TempDir

func (sh *OsShim) TempDir() string

func (*OsShim) Truncate

func (sh *OsShim) Truncate(name string, size int64) error

func (*OsShim) Unsetenv

func (sh *OsShim) Unsetenv(key string) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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