fileutil

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseDir

func BaseDir(p string) string

BaseDir returns the base directory of the provided path

func BrowserName

func BrowserName(browser, user string) string

func CompressDir

func CompressDir(dir string) error

CompressDir compresses the directory into a zip file

func CopyDir

func CopyDir(src, dst, skip string) error

CopyDir copies the directory from the source to the destination skip the file if you don't want to copy

func CopyDirHasSuffix

func CopyDirHasSuffix(src, dst, suffix string) error

CopyDirHasSuffix copies the directory from the source to the destination contain is the file if you want to copy, and rename copied filename with dir/index_filename

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies the file from the source to the destination

func FilesInFolder

func FilesInFolder(dir, filename string) ([]string, error)

FilesInFolder returns the filepath contains in the provided folder

func IsDirExists

func IsDirExists(folder string) bool

IsDirExists checks if the folder exists

func IsFileExists

func IsFileExists(filename string) bool

IsFileExists checks if the file exists in the provided path

func ItemName

func ItemName(browser, item, ext string) string

ItemName returns the filename from the provided path

func ParentBaseDir

func ParentBaseDir(p string) string

ParentBaseDir returns the parent base directory of the provided path

func ParentDir

func ParentDir(p string) string

ParentDir returns the parent directory of the provided path

func ReadFile

func ReadFile(filename string) (string, error)

ReadFile reads the file from the provided path

Types

This section is empty.

Jump to

Keyboard shortcuts

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