util

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIfNotExist

func CreateIfNotExist(fileName, content string) error

CreateIfNotExist creates a file if it is not exists

func Include

func Include(data interface{}, list []interface{}) bool

Include Whether the current array contains the value

func IsFileExist

func IsFileExist(file string) bool

IsFileExist returns true if the specified file is exists

func IsFolderExist

func IsFolderExist(folder string) bool

IsFolderExist returns true if the specified folder is exists

func RemoveIfExist

func RemoveIfExist(filename string) error

RemoveIfExist deletes the specified file if it is exists

Types

type FileInfo

type FileInfo struct {
	Name string
	Path string
}

FileInfo file info

func GetFileListFromFolder

func GetFileListFromFolder(folder string) (files []FileInfo, err error)

GetFileListFromFolder get all file from folder

Jump to

Keyboard shortcuts

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