Documentation ¶
Index ¶
- Constants
- func CheckDirPermission(dir string, perm os.FileMode) error
- func Exist(name string) bool
- func GetOrDefault(key, def string, data map[string]string) (result string)
- func GetReplacement(key string, data map[string]string) (result string)
- func IsDirWriteable(dir string) error
- func PathExists(path string) (bool, error)
Constants ¶
View Source
const ( // PrivateFileMode grants owner to read/write a file. PrivateFileMode = 0600 // PrivateDirMode grants owner to make/remove files inside the directory. PrivateDirMode = 0700 )
Variables ¶
This section is empty.
Functions ¶
func CheckDirPermission ¶
CheckDirPermission checks permission on an existing dir. Returns error if dir is empty or exist with a different permission than specified.
func GetOrDefault ¶
GetOrDefault returns the value or a default value from a map
func GetReplacement ¶
GetReplacement returns a string which replace via a map
func IsDirWriteable ¶
IsDirWriteable checks if dir is writable by writing and removing a file to dir. It returns nil if dir is writable.
func PathExists ¶
PathExists checks if the target path exist or not
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.