fileutil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(file string) bool

Exist checks file or dir if exist.

func GetDirectoryList

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

GetDirectoryList reads the directory named by dirname and returns a list of directory.

func GetExistPath

func GetExistPath(path string) string

GetExistPath gets exist path based on given path.

func ListDir

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

ListDir reads the directory named by dirname and returns a list of filename.

func MkDir

func MkDir(path string) error

MkDir creates dir.

func MkDirIfNotExist

func MkDirIfNotExist(path string) error

MkDirIfNotExist creates given dir if it's not exist.

func RemoveDir

func RemoveDir(path string) error

RemoveDir deletes dir include children if exist.

func RemoveFile

func RemoveFile(file string) error

RemoveFile removes the file if exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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