Documentation ¶
Index ¶
- func CloseFile(file *os.File)
- func CopyEmbeddedFile(fs embed.FS, file, dst string) error
- func DeleteDirectoryIfEmpty(path string) error
- func IsDirectoryEmpty(name string) (bool, error)
- func IsExistingPath(name string) (bool, error)
- func IsFileNameValid(name string) bool
- func MoveFiles(sourceDir, destinationDir string) error
- func PathJoin(elem ...string) string
- func PathUniformize(path string) string
- func ValidFileName(which int, optional bool) cobra.PositionalArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyEmbeddedFile ¶
CopyEmbeddedFile copies an embedded file to a destination.
func DeleteDirectoryIfEmpty ¶
DeleteDirectoryIfEmpty checks if the specified directory is empty. If it is empty, the directory is removed.
func IsDirectoryEmpty ¶
IsDirectoryEmpty check if the requested directory is empty
func IsExistingPath ¶
IsExistingPath check if the requested path exists
func IsFileNameValid ¶
IsFileNameValid returns true if the name is a valid file name.
func PathUniformize ¶ added in v0.0.3
PathUniformize returns uniformized path regarding the device OS.
func ValidFileName ¶
func ValidFileName(which int, optional bool) cobra.PositionalArgs
ValidFileName returns an error if the which arg is not a valid file name.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.