Documentation ¶
Overview ¶
Package file defines functions to determine the file contents. For example, IsFile() returns whether the path is a file or not with a bool value.
Index ¶
- Constants
- func Copy(src string, dest string) error
- func Exists(path string) bool
- func IsDir(path string) bool
- func IsExecutable(path string) bool
- func IsFile(path string) bool
- func IsHiddenFile(filePath string) bool
- func IsReadable(path string) bool
- func IsSymlink(path string) bool
- func IsWritable(path string) bool
- func IsZero(path string) bool
Constants ¶
View Source
const ( // Unknown : Don't use this bits Unknown os.FileMode = 1 << (9 - iota) // Readable : readable bits Readable // Writable : writable bits Writable // Executable : executable bits Executable )
View Source
const ( // FileModeCreatingDir is used for creating directory FileModeCreatingDir fs.FileMode = 0750 // FileModeCreatingFile is used for creating directory FileModeCreatingFile fs.FileMode = 0600 )
Variables ¶
This section is empty.
Functions ¶
func IsExecutable ¶
IsExecutable reports whether the path exists and is executable.
func IsHiddenFile ¶
IsHiddenFile reports whether the path exists and is included hidden file.
func IsReadable ¶
IsReadable reports whether the path exists and is readable.
func IsWritable ¶
IsWritable reports whether the path exists and is writable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.