file

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package file handles the images as files.

Index

Constants

This section is empty.

Variables

View Source
var ErrPointer = errors.New("pointer value cannot be nil")

Functions

func Check

func Check(name string, err error) bool

Check the existence of the named file and confirm it is not a directory or zero-byte file.

func Remove

func Remove(confirm bool, name string) error

Remove the named file, only when confirm is true.

func Remove0byte added in v1.11.0

func Remove0byte(name string) error

Remove0byte removes the named file but only if it is 0 bytes in size.

func Vendor

func Vendor() string

Vendor is the absolute path to store webpbin vendor downloads.

Types

type Image

type Image struct {
	ID   uint
	UUID string
	Name string
	Ext  string
	Size int
}

Image is an image object.

func (Image) IsDir

func (i Image) IsDir(dir *directories.Dir) (bool, error)

func (Image) IsExt

func (i Image) IsExt() bool

func (Image) String

func (i Image) String() string

Jump to

Keyboard shortcuts

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