Documentation ¶
Index ¶
- Constants
- func FindEntryDescending(topSearchPath string, entryName string, types pathType) (desiredPath string, err error)
- func GetFileHash(path string) []byte
- func GetHash(data []byte) []byte
- func GetPathType(path string) pathType
- func IsLinkPointsToDestination(linkPath string, destination string) bool
- func MakeDirectoryIfDoesntExist(directory string) error
Constants ¶
View Source
const ( Regular pathType = 1 << iota Symlink Directory Notexisting Unknown )
Variables ¶
This section is empty.
Functions ¶
func FindEntryDescending ¶
func FindEntryDescending(topSearchPath string, entryName string, types pathType) ( desiredPath string, err error)
FindEntryDescending searches an directory entry from the given topSearchPath and descending to root. It uses pathType as bitwise flags.
func GetFileHash ¶
GetFileHash calculates sha512 with file data. If file doesn't exist then it returns empty slice.
func GetPathType ¶
func GetPathType(path string) pathType
GetPathType returns pathType. If permission denied occur then returns unknown.
func MakeDirectoryIfDoesntExist ¶
MakeDirectoryIfDoesntExist creates directory if it doesn't exist. the error is return if unable to create directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.