Documentation ¶
Index ¶
- Variables
- func DirectoryExists(path string) (bool, error)
- func FileExists(filepath string) (bool, error)
- func ListFiles(dirPath string) ([]string, error)
- func ListFilesByPrefix(dirPath string, prefix string) ([]string, error)
- func MkdirAll(path string, dirMode os.FileMode) error
- func ReadFile(filepath string) ([]byte, error)
- func WriteFile(filepath string, data []byte, fileMode os.FileMode) (retErr error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDirectoryExpected indicates that a directory was expected ErrDirectoryExpected = errors.New("a path to a directory was expected") // ErrFileExpected indicates that a file was expected ErrFileExpected = errors.New("a path to a file was expected") )
Functions ¶
func DirectoryExists ¶
DirectoryExists returns true if directory exists, false otherwise. Returns error if could not verify if directory exists or if path does not point at directory.
func FileExists ¶
FileExists returns true if file exists, false otherwise. Returns error if could not verify if file exists or if path specifies directory instead of file.
func ListFilesByPrefix ¶
ListFilesByPrefix lists all files in directory with prefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.