kubernetes/pkg/util/filesystem/defaultfs.go

type DefaultFs

var _

// NewTempFs returns a fake Filesystem in temporary directory, useful for unit tests
func NewTempFs() Filesystem {}

func (fs *DefaultFs) prefix(path string) string {}

// Stat via os.Stat
func (fs *DefaultFs) Stat(name string) (os.FileInfo, error) {}

// Create via os.Create
func (fs *DefaultFs) Create(name string) (File, error) {}

// Rename via os.Rename
func (fs *DefaultFs) Rename(oldpath, newpath string) error {}

func (fs *DefaultFs) MkdirAll(path string, perm os.FileMode) error {}

// MkdirAllWithPathCheck checks if path exists already. If not, it creates a directory
// named path, along with any necessary parents, and returns nil, or else returns an error.
// Permission bits perm (before umask) are used for all directories that
// MkdirAllWithPathCheck creates.
// If path is already a directory, MkdirAllWithPathCheck does nothing and returns nil.
// NOTE: In case of Windows NTFS, mount points are implemented as reparse-point
// (similar to symlink) and do not represent actual directory. Hence Directory existence
// check for windows NTFS will NOT check for dir, but for symlink presence.
func MkdirAllWithPathCheck(path string, perm os.FileMode) error {}

// Chtimes via os.Chtimes
func (fs *DefaultFs) Chtimes(name string, atime time.Time, mtime time.Time) error {}

// RemoveAll via os.RemoveAll
func (fs *DefaultFs) RemoveAll(path string) error {}

// Remove via os.Remove
func (fs *DefaultFs) Remove(name string) error {}

// ReadFile via os.ReadFile
func (fs *DefaultFs) ReadFile(filename string) ([]byte, error) {}

// TempDir via os.MkdirTemp
func (fs *DefaultFs) TempDir(dir, prefix string) (string, error) {}

// TempFile via os.CreateTemp
func (fs *DefaultFs) TempFile(dir, prefix string) (File, error) {}

// ReadDir via os.ReadDir
func (fs *DefaultFs) ReadDir(dirname string) ([]os.DirEntry, error) {}

// Walk via filepath.Walk
func (fs *DefaultFs) Walk(root string, walkFn filepath.WalkFunc) error {}

type defaultFile

// Name via os.File.Name
func (file *defaultFile) Name() string {}

// Write via os.File.Write
func (file *defaultFile) Write(b []byte) (n int, err error) {}

// Sync via os.File.Sync
func (file *defaultFile) Sync() error {}

// Close via os.File.Close
func (file *defaultFile) Close() error {}