Documentation
¶
Index ¶
- func DurationVar(p *Duration, name string, value time.Duration, usage string)
- func VFSVar(p *VFS, name string, value VFS, usage string)
- type Duration
- type VFS
- func (vfs *VFS) Abs() (string, error)
- func (vfs *VFS) Addr() string
- func (vfs *VFS) FsServer() string
- func (vfs *VFS) Host() string
- func (vfs *VFS) Is(t VFSType) bool
- func (vfs *VFS) IsDisk() bool
- func (vfs *VFS) IsEmpty() bool
- func (vfs *VFS) LocalSyncDisabled() bool
- func (vfs VFS) MarshalText() (text []byte, err error)
- func (vfs *VFS) Path() string
- func (vfs *VFS) Port() int
- func (vfs *VFS) RemotePath() string
- func (vfs *VFS) Server() bool
- func (vfs *VFS) Type() VFSType
- func (vfs *VFS) UnmarshalText(data []byte) error
- type VFSType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationVar ¶ added in v0.3.3
DurationVar defines a core.Duration flag with specified name, default value, and usage string. The argument p points to a core.Duration variable in which to store the value of the flag. The flag accepts a value acceptable to time.ParseDuration.
Types ¶
type Duration ¶ added in v0.3.3
Duration a duration with custom encoding
func (Duration) MarshalText ¶ added in v0.3.3
MarshalText implement interface encoding.TextMarshaler
func (*Duration) UnmarshalText ¶ added in v0.3.3
UnmarshalText implement interface encoding.TextUnmarshaler
type VFS ¶
type VFS struct {
// contains filtered or unexported fields
}
VFS virtual file system
func NewDiskVFS ¶
NewDiskVFS create an instance of VFS for the local disk file system
func NewEmptyVFS ¶
func NewEmptyVFS() VFS
NewEmptyVFS create an instance of VFS for the unknown file system
func NewVFS ¶
NewVFS auto recognition the file system and create an instance of VFS according to the path
func VFSFlag ¶
VFSFlag defines a VFS flag with specified name, default value, and usage string. The return value is the address of a VFS variable that stores the value of the flag.
func (*VFS) LocalSyncDisabled ¶
LocalSyncDisabled is local disk sync disabled
func (VFS) MarshalText ¶ added in v0.3.3
MarshalText implement interface encoding.TextMarshaler
func (*VFS) RemotePath ¶ added in v0.4.3
RemotePath the remote file path
func (*VFS) UnmarshalText ¶ added in v0.3.3
UnmarshalText implement interface encoding.TextUnmarshaler
type VFSType ¶
type VFSType int
VFSType the file data source type
const ( // Unknown the unknown file data source Unknown VFSType = iota // Disk the local disk file system data source Disk // RemoteDisk the remote disk file system data source RemoteDisk // FTP the ftp data source FTP // SFTP the sftp data source SFTP // NetworkDisk the network disk data source NetworkDisk SharedFolder )