Documentation ¶
Index ¶
- Constants
- type IVFSConstructor
- type IVFSController
- type VFSHelper
- type VfsDriverOS
- func (instance *VfsDriverOS) Exists(path string) (response bool, err error)
- func (instance *VfsDriverOS) ListAll(dir string) (response []*VfsFile, err error)
- func (instance *VfsDriverOS) MkDir(path string) (err error)
- func (instance *VfsDriverOS) NewFile(path string) (response *VfsFile, err error)
- func (instance *VfsDriverOS) Read(source string) (response []byte, err error)
- func (instance *VfsDriverOS) Remove(source string) (err error)
- func (instance *VfsDriverOS) Stat(path string) (response *VfsFile, err error)
- func (instance *VfsDriverOS) Write(data []byte, target string) (response int, err error)
- type VfsFile
Constants ¶
View Source
const ( DriverOS = "os" DriverFTP = "ftp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IVFSConstructor ¶
type IVFSConstructor func(args ...interface{}) (controller IVFSController, err error)
type IVFSController ¶
type IVFSController interface { Stat(path string) (*VfsFile, error) ListAll(dir string) ([]*VfsFile, error) Read(source string) ([]byte, error) Write(data []byte, target string) (int, error) Remove(source string) error MkDir(path string) error Exists(path string) (bool, error) }
func NewVfsDriverOS ¶
func NewVfsDriverOS(args ...interface{}) (controller IVFSController, err error)
type VFSHelper ¶
type VFSHelper struct {
// contains filtered or unexported fields
}
var VFS *VFSHelper
func (*VFSHelper) AddConstructor ¶
func (instance *VFSHelper) AddConstructor(driverName string, ctr func(args ...interface{}) (controller IVFSController, err error))
func (*VFSHelper) New ¶
func (instance *VFSHelper) New(driverName string, args ...interface{}) (response IVFSController, err error)
func (*VFSHelper) NewOS ¶
func (instance *VFSHelper) NewOS() (response IVFSController)
type VfsDriverOS ¶
type VfsDriverOS struct { }
VfsDriverOS ( Operating System )
func (*VfsDriverOS) Exists ¶
func (instance *VfsDriverOS) Exists(path string) (response bool, err error)
func (*VfsDriverOS) ListAll ¶
func (instance *VfsDriverOS) ListAll(dir string) (response []*VfsFile, err error)
func (*VfsDriverOS) MkDir ¶
func (instance *VfsDriverOS) MkDir(path string) (err error)
func (*VfsDriverOS) NewFile ¶
func (instance *VfsDriverOS) NewFile(path string) (response *VfsFile, err error)
func (*VfsDriverOS) Read ¶
func (instance *VfsDriverOS) Read(source string) (response []byte, err error)
func (*VfsDriverOS) Remove ¶
func (instance *VfsDriverOS) Remove(source string) (err error)
type VfsFile ¶
type VfsFile struct { AbsolutePath string `json:"absolute-path"` RelativePath string `json:"relative-path"` Root string `json:"root"` Name string `json:"name"` Size int64 `json:"size"` ModTime time.Time `json:"mod_time"` IsDir bool `json:"is_dir"` Mode string `json:"mode"` }
func (*VfsFile) SetAbsolutePath ¶
Click to show internal directories.
Click to hide internal directories.