filehandler

package
v0.0.0-...-95e20c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRarToCbz

func ConvertRarToCbz(src string) error

func CreateFolderIfNotExists

func CreateFolderIfNotExists(path string) error

func CreateTemp

func CreateTemp(dir, path string) (*os.File, error)

func DeleteFile

func DeleteFile(path string) error

func DeleteFolder

func DeleteFolder(path string) error

func FileArgExists

func FileArgExists(path, name string) error

func FileExists

func FileExists(path string) (bool, error)

func FolderArgExists

func FolderArgExists(path, name string) error

func FolderExists

func FolderExists(path string) (bool, error)

func GetAllFilesWithExtInASpecificFolder

func GetAllFilesWithExtInASpecificFolder(dir, ext string) ([]string, error)

func GetDataDir

func GetDataDir(folder string) (string, error)

func GetFileFolder

func GetFileFolder(filePath string) string

func GetFileSize

func GetFileSize(path string) (float64, error)

func GetFilesFromZip

func GetFilesFromZip(src string) (*zip.ReadCloser, map[string]*zip.File, error)

func GetFoldersInCurrentFolder

func GetFoldersInCurrentFolder(path string) ([]string, error)

func JoinPath

func JoinPath(elements ...string) string

func ReadInBinaryFileContents

func ReadInBinaryFileContents(path string) ([]byte, error)

func ReadInFileContents

func ReadInFileContents(path string) (string, error)

func ReadInZipFileBytes

func ReadInZipFileBytes(zipFile *zip.File) ([]byte, error)

func ReadInZipFileContents

func ReadInZipFileContents(zipFile *zip.File) (string, error)

func Rename

func Rename(src, dest string) error

func UnzipFile

func UnzipFile(zipFile *os.File, destDir string) error

func WriteBinaryFileContents

func WriteBinaryFileContents(path string, content []byte) error

func WriteFileContents

func WriteFileContents(path, content string) error

func WriteZipCompressedBytes

func WriteZipCompressedBytes(w *zip.Writer, filename string, data []byte) error

func WriteZipCompressedFile

func WriteZipCompressedFile(w *zip.Writer, zipFile *zip.File) error

func WriteZipCompressedString

func WriteZipCompressedString(w *zip.Writer, filename, contents string) error

func WriteZipUncompressedFile

func WriteZipUncompressedFile(w *zip.Writer, zipFile *zip.File) error

func WriteZipUncompressedString

func WriteZipUncompressedString(w *zip.Writer, filename, contents string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL