sdfiletype

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sdfiletype 通过内容判别文件类型

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchExt

func MatchExt(data []byte, def string) string

func MatchFileExt

func MatchFileExt(filename, def string) string

func MatchFileMime

func MatchFileMime(filename, def string) string

func MatchMime

func MatchMime(data []byte, def string) string

func MatchReaderExt

func MatchReaderExt(r io.Reader, def string) string

func MatchReaderMime

func MatchReaderMime(r io.Reader, def string) string

Types

type Type

type Type = types.Type

func Match

func Match(data []byte) (Type, error)

func MatchFile

func MatchFile(filename string) (Type, error)

func MatchReader

func MatchReader(r io.Reader) (Type, error)

Jump to

Keyboard shortcuts

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