Documentation ¶
Overview ¶
Package files implements utility routines for gathering information about files and their contents.
Index ¶
- func ConvertToMapOfFiles(files []*mpi.File) map[string]*mpi.File
- func FileMeta(filePath string) (*mpi.FileMeta, error)
- func FileMetaWithCertificate(filePath string) (*mpi.FileMeta, error)
- func FileMode(mode string) os.FileMode
- func GenerateConfigVersion(fileSlice []*mpi.File) string
- func GenerateHash(b []byte) string
- func Permissions(fileMode os.FileMode) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToMapOfFiles ¶
ConvertToMapOfFiles converts a list of files to a map of files with the file name as the key
func FileMetaWithCertificate ¶
FileMetaWithCertificate returns a FileMeta struct with certificate metadata if applicable.
func GenerateConfigVersion ¶
GenerateConfigVersion returns a unique config version for a set of files. The config version is calculated by joining the file hashes together and generating a unique ID.
func GenerateHash ¶
GenerateHash returns the hash value of a file's contents.
func Permissions ¶
Permissions returns a file's permissions as a string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.