files

package
v0.0.0-...-381c4e2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyFileList = errors.New("empty file list")

Functions

func Close

func Close(f *os.File) error

func CombinedOutput

func CombinedOutput(c *exec.Cmd) ([]byte, error)

func Create

func Create(s string) (f *os.File, err error)

func CreateExclusiveWriteOnly

func CreateExclusiveWriteOnly(p string) (f *os.File, err error)

func CreateExclusiveWriteOnlyAndMaybeMakeDir

func CreateExclusiveWriteOnlyAndMaybeMakeDir(p string) (f *os.File, err error)

func DeleteFilesAndDirs

func DeleteFilesAndDirs(args ...string) (err error)

func DeleteFilesAndDirsSet

func DeleteFilesAndDirsSet(
	fs schnittstellen.SetLike[schnittstellen.Stringer],
) (err error)

func DirExists

func DirExists(path string) bool

func Exists

func Exists(path string) bool

func IsTty

func IsTty(f *os.File) (ok bool)

func Len

func Len() int

func MakeDirNameWriterIgnoringHidden

func MakeDirNameWriterIgnoringHidden(
	wf func(string) error,
) func(string) error

func Open

func Open(s string) (f *os.File, err error)

func OpenCreateWriteOnlyTruncate

func OpenCreateWriteOnlyTruncate(s string) (f *os.File, err error)

func OpenExclusiveReadOnly

func OpenExclusiveReadOnly(s string) (f *os.File, err error)

func OpenExclusiveWriteOnly

func OpenExclusiveWriteOnly(s string) (f *os.File, err error)

func OpenExclusiveWriteOnlyTruncate

func OpenExclusiveWriteOnlyTruncate(s string) (f *os.File, err error)

func OpenFile

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

func OpenFiles

func OpenFiles(p ...string) (err error)

func OpenReadWrite

func OpenReadWrite(s string) (f *os.File, err error)

func PathElements

func PathElements(p string) []string

func ReadAllString

func ReadAllString(s ...string) (o string, err error)

func ReadDir

func ReadDir(ps ...string) (dirEntries []os.DirEntry, err error)

func ReadDirNames

func ReadDirNames(ps ...string) (names []string, err error)

func ReadDirNamesLevel2

func ReadDirNamesLevel2(
	wf func(string) error,
	p string,
) (err error)

func ReadDirNamesTo

func ReadDirNamesTo(
	wf func(string) error,
	p string,
) (err error)

func RemoveIfExists

func RemoveIfExists(p string) (err error)

func Rename

func Rename(src, dst string) (err error)

func SetAllowUserChanges

func SetAllowUserChanges(paths ...string) (err error)

func SetAllowUserChangesRecursive

func SetAllowUserChangesRecursive(paths ...string) (err error)

func SetDisallowUserChanges

func SetDisallowUserChanges(paths ...string) (err error)

func TempDir

func TempDir() (d string, err error)

func TempFile

func TempFile(d string) (f *os.File, err error)

func TempFileInDir

func TempFileInDir(dir string) (f *os.File, err error)

func TempFileWithPattern

func TempFileWithPattern(pattern string) (f *os.File, err error)

Types

type NopWriteCloser

type NopWriteCloser struct {
	io.Writer
}

func (NopWriteCloser) Close

func (_ NopWriteCloser) Close() error

Jump to

Keyboard shortcuts

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