file

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNotExist

func CheckNotExist(src string) bool

CheckNotExist check if the file exists

func CheckPermission

func CheckPermission(src string) bool

CheckPermission check if the file has permission

func CopyDir

func CopyDir(source string, dest string) (err error)

CopyDir copies the source directory to the dest directory.

func CopyFile

func CopyFile(source string, dest string) (err error)

CopyFile copies the source file to the dest file.

func GetExt

func GetExt(fileName string) string

GetExt get the file ext

func GetSize

func GetSize(f multipart.File) (int, error)

GetSize get the file size

func IsDir

func IsDir(path string) bool

IsDir determines whether the specified path is a directory.

func IsNotExistMkDir

func IsNotExistMkDir(src string) error

IsNotExistMkDir create a directory if it does not exist

func MkDir

func MkDir(src string) error

MkDir create a directory

func MustOpen

func MustOpen(fileName, filePath string) (*os.File, error)

MustOpen maximize trying to open the file

func Open

func Open(name string, flag int, perm os.FileMode) (*os.File, error)

Open a file according to a specific mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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