file

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotExist represents that the file or directory does not exist.
	NotExist = iota
	// FileType represents a file.
	FileType
	// DirType represents a directory.
	DirType
)

Variables

This section is empty.

Functions

func EnsureDir

func EnsureDir(dir string)

EnsureDir create dir if not exist

func Getwd

func Getwd() string

Getwd returns a rooted path name corresponding to the current directory

func IsDir

func IsDir(filename string) bool

IsDir returns true if it's a directory, or return false.

func IsExist

func IsExist(filename string) bool

IsExist returns true if the file or directory exists, or return false.

func IsFile

func IsFile(filename string) bool

IsFile returns true if it's a file, or return false.

func MustHash

func MustHash(filename string) []byte

MustHash cac file hash

func RemoveExt

func RemoveExt(filePath string) string

RemoveExt defined

func Type

func Type(name string) uint8

Type decides the type of a file.

It returns FileType, DirType, or NotExist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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