Documentation
¶
Index ¶
- Constants
- func CreateFolderSafely(path string, permissions os.FileMode) (err error)
- func Exists(path string) (exists bool, err error)
- func FileExists(filePath string) (ok bool, err error)
- func FolderExists(folderPath string) (ok bool, err error)
- func GetFileContents(filePath string) (contents []byte, err error)
Constants ¶
View Source
const ( ErrObjectIsNotFile = "object is not a file" ErrObjectIsNotFolder = "object is not a folder" )
Variables ¶
This section is empty.
Functions ¶
func CreateFolderSafely ¶
CreateFolderSafely tries to create a folder ignoring an error if the folder already exists.
func Exists ¶
Exists tries to get access to an object at the specified path – it may be a file or a folder.
func FileExists ¶
FileExists tells if a file exists.
func FolderExists ¶
FolderExists tells if a folder exists.
func GetFileContents ¶ added in v0.5.0
GetFileContents gets file's contents.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.