Documentation ¶
Overview ¶
Provides utility functions for common file operations
Index ¶
- func GenerateSecretFileName(name string) string
- func GetDecFileName(file *os.File) string
- func GetEncFileName(file *os.File) string
- func GetFileMode(file *os.File) fs.FileMode
- func GetFileSize(file *os.File) int
- func GetFilesInDirectory(dir string) ([]string, error)
- func GetMd5Sum(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSecretFileName ¶
GenerateSecretFileName generates a unique secret file name based on the MD5 hash and a random string.
func GetDecFileName ¶
GetDecFileName generates the decrypted file name by removing the ".age" extension.
func GetEncFileName ¶
GetEncFileName generates the encrypted file name with the ".age" extension.
func GetFileMode ¶
GetFileMode returns the mode of the specified file.
func GetFileSize ¶
GetFileSize returns the size of the specified file.
func GetFilesInDirectory ¶
GetFilesInDirectory returns a slice containing the paths of all files in the specified directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.