file

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFilePath

func ParseFilePath(path string) (pth string, fName string, ext string)

func ReadFile added in v0.0.5

func ReadFile(fileName string) (string, error)

Types

type FileType

type FileType struct {
	Type     string `json:"type"`
	Category string `json:"category"`
}

func GetFileType

func GetFileType(file *multipart.File) FileType

func GetFileTypeWithByte

func GetFileTypeWithByte(fSrc []byte) FileType

GetFileTypeWithByte 用文件前面几个字节来判断 fSrc: 文件字节流(就用前面几个字节)

Jump to

Keyboard shortcuts

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