Documentation ¶
Index ¶
- func ConvertRarToCbz(src string)
- func FileExists(path string) bool
- func FileMustExist(path, name string)
- func FolderExists(path string) bool
- func FolderMustExist(path, name string)
- func GetFileFolder(filePath string) string
- func GetFoldersInCurrentFolder(path string) []string
- func JoinPath(elements ...string) string
- func MustCreateFolderIfNotExists(path string)
- func MustGetAllFilesWithExtInASpecificFolder(dir, ext string) []string
- func MustGetAllFilesWithExtsInASpecificFolderAndSubFolders(dir string, exts ...string) []string
- func MustGetFileSize(path string) float64
- func MustRename(src, dest string)
- func ReadInBinaryFileContents(path string) []byte
- func ReadInFileContents(path string) string
- func Rezip(src, dest string) error
- func Unzip(src, dest string) error
- func UnzipRunOperationAndRezip(src, dest string, operation func())
- func UnzipSource(source, destination string) error
- func WriteBinaryFileContents(path string, content []byte)
- func WriteFileContents(path, content string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRarToCbz ¶
func ConvertRarToCbz(src string)
func FileExists ¶
func FileMustExist ¶
func FileMustExist(path, name string)
func FolderExists ¶
func FolderMustExist ¶
func FolderMustExist(path, name string)
func GetFileFolder ¶
func MustCreateFolderIfNotExists ¶
func MustCreateFolderIfNotExists(path string)
func MustGetAllFilesWithExtsInASpecificFolderAndSubFolders ¶
based on https://stackoverflow.com/a/67629473
func MustGetFileSize ¶
func MustRename ¶
func MustRename(src, dest string)
func ReadInFileContents ¶
func Rezip ¶
Rezip is based on https://stackoverflow.com/a/63233911
func Unzip ¶
Unzip is based on https://stackoverflow.com/a/24792688
func UnzipRunOperationAndRezip ¶
func UnzipRunOperationAndRezip(src, dest string, operation func())
UnzipRunOperationAndRezip starts by deleting the destination directory if it exists, then it goes ahead an unzips the contents into the destination directory once that is done it runs the operation func on the destination folder lastly it rezips the folder back to compress.zip
func UnzipSource ¶
func WriteBinaryFileContents ¶
func WriteFileContents ¶
func WriteFileContents(path, content string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.