Documentation
¶
Overview ¶
Utilities to easy input-output
Index ¶
- func Exists(path string) bool
- func HomeDir() string
- func IsDirectory(path string) bool
- func Lines(path string, f func(s string))
- func List(dir string) []os.FileInfo
- func Mkdir(f string)
- func Mkdirs(f string)
- func OpenAppend(path string) *os.File
- func OpenRead(path string) *os.File
- func OpenWrite(path string) *os.File
- func ReadAll(path string) string
- func ReadAllBin(path string) []byte
- func Remove(path string) error
- func Rename(oldname, newname string)
- func TempDir(prefix string) string
- func TempFile(dir string, prefix string) *os.File
- func Unzip(archive, target string) error
- func Write(file *os.File, text string)
- func WriteAll(path, text string)
- func WriteAllBin(path string, data []byte)
- func WriteBin(file *os.File, data []byte)
- func Zip(source, target string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirectory ¶
Is directory return true if path exists and is a directory
func OpenAppend ¶
OpenRead opens path for append. If fails throws a panic(error).
func ReadAllBin ¶
Read reads a file completely. (File is open and closed)
func TempDir ¶
TempDir makes a directorio in the temporal directory. If fails throws a panic(error),
func TempFile ¶
TempFile creates a file in 'dir'. If 'dir' is "" file is created in the temporal directory.
func WriteAll ¶
func WriteAll(path, text string)
WriteAll writes a text overwriting 'file'. (File is open and closed)
func WriteAllBin ¶
WriteAll writes data overwriting 'file'. (File is open and closed)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.