content

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contents

type Contents map[int]File

type File

type File struct {
	Name       string         // Name of the file.
	Ext        string         // Extension of the file.
	Path       string         // Path to the file.
	Mime       *mimetype.MIME // File MIME type.
	Size       int64          // Size of file in bytes.
	Executable bool           // Executable program file.
	Textfile   bool           // Human readable text file.
}

File details and metadata.

func (*File) MIME

func (c *File) MIME() error

MIME saves the file MIME information and name extension.

func (*File) Scan

func (c *File) Scan(f os.FileInfo)

Scan saves the filename, size and temporary path.

func (File) String

func (c File) String() string

Jump to

Keyboard shortcuts

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