Documentation ¶
Overview ¶
Additional helpers for working with file paths and filesystem information
Index ¶
- func DirExists(path string) bool
- func Exists(path string) bool
- func ExpandUser(path string) (string, error)
- func FileExists(path string) bool
- func IsAppend(mode os.FileMode) bool
- func IsAppendable(filename string) bool
- func IsCharDevice(mode os.FileMode) bool
- func IsDevice(mode os.FileMode) bool
- func IsExclusive(mode os.FileMode) bool
- func IsNamedPipe(mode os.FileMode) bool
- func IsNonemptyDir(path string) bool
- func IsNonemptyExecutableFile(path string) bool
- func IsNonemptyFile(path string) bool
- func IsReadable(filename string) bool
- func IsSetgid(mode os.FileMode) bool
- func IsSetuid(mode os.FileMode) bool
- func IsSocket(mode os.FileMode) bool
- func IsSticky(mode os.FileMode) bool
- func IsSymlink(mode os.FileMode) bool
- func IsTemporary(mode os.FileMode) bool
- func IsWritable(filename string) bool
- func LinkExists(path string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandUser ¶
ExpandUser replaces the tilde (~) in a path into the current user's home directory.
func FileExists ¶
Returns true if the given path exists and is a regular file.
func IsAppendable ¶ added in v1.6.18
Returns true if the given file can be opened for appending by the current user.
func IsCharDevice ¶
func IsExclusive ¶
func IsNamedPipe ¶
func IsNonemptyDir ¶
Returns true if the given path is a directory with items in it.
func IsNonemptyExecutableFile ¶ added in v1.6.8
Returns true if the given path is a regular file, is executable by any user, and has a non-zero size.
func IsNonemptyFile ¶
Returns true if the given path is a regular file with a non-zero size.
func IsReadable ¶
Returns true if the given file can be opened for reading by the current user.
func IsTemporary ¶
func IsWritable ¶
Returns true if the given file can be opened for writing by the current user.
func LinkExists ¶ added in v1.6.18
Returns true if the given path exists and is a symbolic link.
Types ¶
This section is empty.