Documentation ¶
Index ¶
- func NewStandaloneFile(filespace filesystem.Filespace, path, mime string) (filesystem.File, error)
- func NewTMPStandaloneFile(filespace filesystem.Filespace, name, mime string) (filesystem.File, error)
- func OpenStandaloneFile(filespace filesystem.Filespace, path string) (filesystem.File, error)
- type StandaloneFile
- func (f *StandaloneFile) CreateTime() time.Time
- func (f *StandaloneFile) DeferOn(scope app.EventScope, eventID int)
- func (f *StandaloneFile) Filespace() filesystem.Filespace
- func (f *StandaloneFile) IsDir() bool
- func (f *StandaloneFile) IsExist() bool
- func (f *StandaloneFile) IsFile() bool
- func (f *StandaloneFile) MIME() string
- func (f *StandaloneFile) Name() string
- func (f *StandaloneFile) Path() string
- func (f *StandaloneFile) ReadFile() ([]byte, error)
- func (f *StandaloneFile) Reader() (filesystem.Reader, error)
- func (f *StandaloneFile) Remove() error
- func (f *StandaloneFile) WriteFile(data []byte, perm os.FileMode) error
- func (f *StandaloneFile) Writer() (filesystem.Writer, error)
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) 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) 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
Click to show internal directories.
Click to hide internal directories.