filenative

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFile

func NewFile(file string) file.File

NewFile create New nativefile type

Types

type BasicFile

type BasicFile struct {
	// contains filtered or unexported fields
}

BasicFile struct

func (*BasicFile) Available

func (f *BasicFile) Available() bool

Available does this file exist?

func (*BasicFile) Decode

func (f *BasicFile) Decode(enctype encodeenum.Encoding) []byte

Decode file data

func (*BasicFile) Delete

func (f *BasicFile) Delete() bool

Delete file

func (*BasicFile) DeleteAll

func (f *BasicFile) DeleteAll() bool

DeleteAll contents

func (*BasicFile) Dir

func (f *BasicFile) Dir() bool

Dir is this a directory

func (*BasicFile) Encode

func (f *BasicFile) Encode(enctype encodeenum.Encoding) string

Encode file data

func (*BasicFile) HRByteCount

func (f *BasicFile) HRByteCount(si bool) string

HRByteCount return a string to represent a size

func (*BasicFile) Hash

func (f *BasicFile) Hash(hasher hash.Hasher, rebuild bool) []byte

Hash creates a hash from the file

func (*BasicFile) Name

func (f *BasicFile) Name() string

Name pull off name from file path

func (*BasicFile) Path

func (f *BasicFile) Path() string

Path show path to file

func (*BasicFile) PathOnly

func (f *BasicFile) PathOnly() string

PathOnly show only the path no name

func (*BasicFile) SetMeta

func (f *BasicFile) SetMeta(m file.Meta)

SetMeta set meta data on object

func (BasicFile) Size

func (f BasicFile) Size() int64

Size get size of file

func (*BasicFile) Type

func (f *BasicFile) Type() string

Type what is the file type

Jump to

Keyboard shortcuts

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