Documentation ¶
Overview ¶
Package fileutil contains utilities for working with the file system.
Package fileutil contains utilities for working with the file system.
Index ¶
- type Fileutil
- func (futl *Fileutil) DeleteFile(filepath string) (err error)
- func (futl *Fileutil) Exists(filePath string) bool
- func (futl *Fileutil) GetFileMode(path string) (mode os.FileMode)
- func (futl *Fileutil) LocalFileExist(path string) (bool, error)
- func (futl *Fileutil) MakeDirs(destinationDir string) (err error)
- func (futl *Fileutil) ReadAllText(filePath string) (text string, err error)
- func (futl *Fileutil) Uncompress(log log.T, src, dest string) error
- func (futl *Fileutil) Unzip(src, dest string) error
- func (futl *Fileutil) WriteAllText(filePath string, text string) (err error)
- type IFileutil
- type IosFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fileutil ¶
type Fileutil struct {
// contains filtered or unexported fields
}
func NewFileUtil ¶
func (*Fileutil) DeleteFile ¶
DeleteFile deletes the specified file
func (*Fileutil) Exists ¶
Exists returns true if the given file exists, false otherwise, ignoring any underlying error
func (*Fileutil) LocalFileExist ¶
LocalFileExist returns true if the given file exists, false otherwise.
func (*Fileutil) ReadAllText ¶
ReadAllText reads all content from the specified file
func (*Fileutil) Uncompress ¶
Uncompress untar the installation package
type IFileutil ¶
type IFileutil interface { DeleteFile(filepath string) (err error) ReadAllText(filePath string) (text string, err error) WriteAllText(filePath string, text string) (err error) Exists(filePath string) bool LocalFileExist(path string) (bool, error) MakeDirs(destinationDir string) (err error) GetFileMode(path string) (mode os.FileMode) Unzip(src, dest string) error }
type IosFS ¶
type IosFS interface { IsNotExist(err error) bool MkdirAll(path string, perm os.FileMode) error Open(name string) (*os.File, error) Remove(name string) error Rename(oldpath string, newpath string) error Stat(name string) (os.FileInfo, error) WriteFile(filename string, data []byte, perm os.FileMode) error }
Click to show internal directories.
Click to hide internal directories.