Documentation ¶
Overview ¶
Package fs holds some utilities for manipulating the file system
Index ¶
- func CopyFile(origFilePath, destFilePath string) (err error)
- func CopyFolder(origFolderPath, destFolderPath string) error
- func CreateSecureFile(file string) (*os.File, error)
- func CreateSecureFolder(folder string) string
- func Exists(filePath string) (bool, error)
- func FileExists(filePath, name string) bool
- func Files(folderPath string) ([]string, error)
- func FolderExists(folderPath, name string) bool
- func Folders(folderPath string) ([]string, error)
- func HomeFolder() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFolder ¶
CopyFolder copy files inside a folder to another folder recursively
func CreateSecureFile ¶
CreateSecureFile creates a file with wr permission for user only and returns the file handle.
func CreateSecureFolder ¶
CreateSecureFolder checks if the folder exists and has the appropriate permission rights. In case of bad permission rights the empty string is returned. If the folder doesn't exist it, create it.
func FileExists ¶
FileExists returns true if the given name is a file in the given path. name must be the "basename" of the file and path must be the folder where it lies.
func FolderExists ¶
FolderExists returns true if the given name is a folder in the given path. name must be the "basename" of the file and path must be the folder where it lies.
Types ¶
This section is empty.