utils

package
v0.0.0-...-9021772 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) bool

func StringArrayUnique

func StringArrayUnique(input []string) []string

StringArrayUnique remove duplicate elements from array

func UUID

func UUID() string

UUID create a uuid

Types

type File

type File struct {
	Path     string
	Checksum string
	Size     int64
	Type     FileType
	Symlink  string
	Mode     uint32
	UID      uint32
	User     string
	GID      uint32
	Group    string
	Base     string
}

func AllFiles

func AllFiles(dir string) ([]File, error)

AllFiles 返回目录/文件下所有的目录/文件

type FileType

type FileType string
const (
	FileTypeNormal    FileType = "Normal"
	FileTypeDirectory FileType = "Directory"
	FileTypeSymlink   FileType = "Symlink"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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