Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exists ¶
Exists returns true if path is an existing file or directory, otherwise it returns false. If followLinks is true, then Exists will attempt to follow links to their target and report said target's existence. If followLinks is false, Exist will operate on the link itself.
func IsRegularFile ¶
IsRegularFile returns true if path represents a regular file, otherwise it returns false.
func SameContents ¶
SameContents checks that two files contain the same bytes
Types ¶
type FileStatus ¶
type FileStatus int
FileStatus enumerates the states of a file on the filesystem.
const ( // StatusAbsent means that the file does not exist. StatusAbsent FileStatus = iota // StatusRegularFile means that the file exists as a regular file. StatusRegularFile // StatusLink means that the artifact exists as a link. StatusLink // StatusDirectory means that the file exists as a directory. StatusDirectory // StatusOther means none of the above. StatusOther )
func FileStatusFromPath ¶
func FileStatusFromPath(path string) (FileStatus, error)
FileStatusFromPath converts a path into a FileStatus enum value.
func (FileStatus) String ¶
func (fs FileStatus) String() string
Click to show internal directories.
Click to hide internal directories.