fileutil

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 10 Imported by: 12

Documentation

Index

Constants

View Source
const (
	DefaultDirPerms  fs.FileMode = 0755
	DefaultFilePerms fs.FileMode = 0644
)

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dest string) error

func CopyFile

func CopyFile(src string, dest string) error

func DirExists

func DirExists(dir string) bool

func Exists

func Exists(filename string) bool

func FileExists

func FileExists(filename string) bool

func HasStdin

func HasStdin() bool

func IsSameFile

func IsSameFile(p1 string, p2 string) bool

func MkdirAll

func MkdirAll(dirs ...string) []error

func ReadLineByLine

func ReadLineByLine(path string, action func(line string)) error

func ReadLineByLineChan

func ReadLineByLineChan(path string) (chan string, error)

func ReadLineByLineChanReader

func ReadLineByLineChanReader(r io.Reader) chan string

func ReadLineByLineReader

func ReadLineByLineReader(file io.Reader, action func(line string)) error

func ReadLines

func ReadLines(path string) ([]string, error)

func ReadLinesMap

func ReadLinesMap(path string) (map[string]bool, error)

func ReadLinesMapReader

func ReadLinesMapReader(file io.Reader) (map[string]bool, error)

func ReadLinesReader

func ReadLinesReader(file io.Reader) ([]string, error)

func ReadLowerLineByLine

func ReadLowerLineByLine(path string, action func(line string)) error

func ReadLowerLineByLineReader

func ReadLowerLineByLineReader(file io.Reader, action func(line string)) error

func ReadLowerLineMap

func ReadLowerLineMap(path string) (map[string]bool, error)

func ReadLowerLineMapReader

func ReadLowerLineMapReader(file io.Reader) (map[string]bool, error)

func ReadLowerLines

func ReadLowerLines(path string) ([]string, error)

func ReadLowerLinesReader

func ReadLowerLinesReader(file io.Reader) ([]string, error)

func WriteLines

func WriteLines(path string, lines []string) error

func WriteLowerUniqueLines

func WriteLowerUniqueLines(path string, lines []string) error

func WriteString

func WriteString(path string, content string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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