fsstandalone

package
v0.0.0-...-a532a67 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandaloneFile

func NewStandaloneFile(filespace filesystem.Filespace, path, mime string) (filesystem.File, error)

NewStandaloneFile create new standalone file instance

func NewTMPStandaloneFile

func NewTMPStandaloneFile(filespace filesystem.Filespace, name, mime string) (filesystem.File, error)

NewTMPStandaloneFile create new temporary standalone file instance

func OpenStandaloneFile

func OpenStandaloneFile(filespace filesystem.Filespace, path string) (filesystem.File, error)

OpenStandaloneFile open file and create its standalone file instance

Types

type StandaloneFile

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

StandaloneFile is a standalone file (it cointains its filesystem handler)

func (*StandaloneFile) CreateTime

func (f *StandaloneFile) CreateTime() time.Time

CreateTime return file create time

func (*StandaloneFile) DeferOn

func (f *StandaloneFile) DeferOn(scope app.EventScope, eventID int)

DeferOn connect file with scope. Remove it on event by eventID

func (*StandaloneFile) Filespace

func (f *StandaloneFile) Filespace() filesystem.Filespace

Filespace return filespace of the StandaloneFile

func (*StandaloneFile) IsDir

func (f *StandaloneFile) IsDir() bool

IsDir return true if node is a directory

func (*StandaloneFile) IsExist

func (f *StandaloneFile) IsExist() bool

IsExist return true if file exists

func (*StandaloneFile) IsFile

func (f *StandaloneFile) IsFile() bool

IsFile return true if node is a file

func (*StandaloneFile) MIME

func (f *StandaloneFile) MIME() string

MIME return file MIME type

func (*StandaloneFile) Name

func (f *StandaloneFile) Name() string

Name return file name

func (*StandaloneFile) Path

func (f *StandaloneFile) Path() string

Path return a file path

func (*StandaloneFile) ReadFile

func (f *StandaloneFile) ReadFile() ([]byte, error)

ReadFile read file by path

func (*StandaloneFile) Reader

func (f *StandaloneFile) Reader() (filesystem.Reader, error)

Reader return a file node reader

func (*StandaloneFile) Remove

func (f *StandaloneFile) Remove() error

Remove delete node by path

func (*StandaloneFile) WriteFile

func (f *StandaloneFile) WriteFile(data []byte, perm os.FileMode) error

WriteFile write file by path

func (*StandaloneFile) Writer

func (f *StandaloneFile) Writer() (filesystem.Writer, error)

Writer return a file node writer

Jump to

Keyboard shortcuts

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