Documentation ¶
Index ¶
- type Filesystem
- func (f *Filesystem) Copy(src string, dst string) error
- func (f *Filesystem) CreateDir(path string, args ...interface{}) error
- func (f *Filesystem) Delete(path string) error
- func (f *Filesystem) DeleteDir(path string) error
- func (f *Filesystem) Has(path string) (bool, error)
- func (f *Filesystem) HasDir(path string) (bool, error)
- func (f *Filesystem) MimeType(path string) (string, error)
- func (f *Filesystem) Read(path string) (string, error)
- func (f *Filesystem) ReadAndDelete(path string) (string, error)
- func (f *Filesystem) Rename(src string, dst string) error
- func (f *Filesystem) Write(path, content string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
Filesystem repretents a fly filesystem.
func NewFly ¶
func NewFly(adapter adapter.Adapter) *Filesystem
NewFly creates a new filesystem struct.
func (*Filesystem) Copy ¶
func (f *Filesystem) Copy(src string, dst string) error
Copy will copy a file from source path to destionation path.
func (*Filesystem) CreateDir ¶
func (f *Filesystem) CreateDir(path string, args ...interface{}) error
CreateDir creates a new directory.
func (*Filesystem) Delete ¶
func (f *Filesystem) Delete(path string) error
Delete will delete a file from source path.
func (*Filesystem) DeleteDir ¶
func (f *Filesystem) DeleteDir(path string) error
DeleteDir will delete a directory.
func (*Filesystem) Has ¶
func (f *Filesystem) Has(path string) (bool, error)
Has will check if a file exists.
func (*Filesystem) HasDir ¶
func (f *Filesystem) HasDir(path string) (bool, error)
HasDir will check if a directory exists.
func (*Filesystem) MimeType ¶
func (f *Filesystem) MimeType(path string) (string, error)
MimeType will return the file mime type.
func (*Filesystem) Read ¶
func (f *Filesystem) Read(path string) (string, error)
Read will read file content.
func (*Filesystem) ReadAndDelete ¶
func (f *Filesystem) ReadAndDelete(path string) (string, error)
ReadAndDelete will read file content and then delete the file.
func (*Filesystem) Rename ¶
func (f *Filesystem) Rename(src string, dst string) error
Rename will rename a file.
func (*Filesystem) Write ¶
func (f *Filesystem) Write(path, content string, args ...interface{}) error
Write will write content to a file.
Click to show internal directories.
Click to hide internal directories.