Documentation ¶
Index ¶
- func CloseFileWithError(file *os.File, err error) error
- func CopyFile(src, dst string) (err error)
- func DirFromPath(path string) (string, error)
- func FileInfosSplit(all []os.FileInfo, inclDotDirs bool) ([]os.FileInfo, []os.FileInfo)
- func FileinfosNames(fis []os.FileInfo) []string
- func FilepathModAgeGTE(path string, s string) (bool, error)
- func FilepathModAgeLTE(path string, s string) (bool, error)
- func FilterFilenamesSizeGtZero(filepaths ...string) []string
- func GetFileModAge(fi os.FileInfo) (time.Duration, error)
- func GetFilepathModAge(path string) (time.Duration, error)
- func ReadAllOrError(r io.Reader) []byte
- func ReadDirSplit(dirname string, inclDotDirs bool) ([]os.FileInfo, []os.FileInfo, error)
- func ReadFileJSON(file string, v interface{}) error
- func ReaderToBytes(ior io.Reader) []byte
- func RemoveAllChildren(dir string) error
- func SplitBest(path string) (dir, file string, err error)
- func SplitBetter(path string) (dir, file string)
- func WriteFileJSON(filepath string, data interface{}, perm os.FileMode, prefix, indent string) error
- type FileInfoMore
- type FileType
- type FileWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirFromPath ¶
func FileInfosSplit ¶
func FileinfosNames ¶
func ReadAllOrError ¶
ReadAllOrError will successfully return the data or return the error in the value return value. This is useful to simply test scripts where the data is printed for debugging or testing.
func ReadDirSplit ¶
func ReadFileJSON ¶
ReadFileJSON reads and unmarshals a file.
func ReaderToBytes ¶
ReaderToBytes reads from an io.Reader, e.g. io.ReadCloser
func RemoveAllChildren ¶
func SplitBetter ¶
Types ¶
type FileInfoMore ¶
func NewFileInfoMoreFromPath ¶
func NewFileInfoMoreFromPath(path string) (FileInfoMore, error)
type FileWriter ¶
func NewFileWriter ¶
func NewFileWriter(path string) (FileWriter, error)
func (*FileWriter) Close ¶
func (f *FileWriter) Close()
Click to show internal directories.
Click to hide internal directories.