Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dir ¶
type Dir string
Dir is an implementation of a Virtual FileSystem
type File ¶
type File interface {
io.Closer
io.Reader
io.Seeker
Readdir(count int) ([]os.FileInfo, error)
Stat() (os.FileInfo, error)
}
File is copied from http.File
type FileSystem ¶
FileSystem is a Virtual FileSystem with Symlink support
func NewVFS ¶
func NewVFS(httpfs http.FileSystem) FileSystem
NewVFS gives an http.FileSystem (real) symlink support
type Options ¶
type Options struct {
// OnSymlink can specify what to do on symlink
OnSymlink func(src string) SymlinkAction
// Skip can specify which files should be skipped
Skip func(src string) (bool, error)
// AddPermission to every entities,
// NO MORE THAN 0777
AddPermission os.FileMode
// Sync file after copy.
// Useful in case when file must be on the disk
// (in case crash happens, for example),
// at the expense of some performance penalty
Sync bool
}
Options specifies optional actions on copying.
type SymlinkAction ¶
type SymlinkAction int
SymlinkAction represents what to do on symlink.
const ( // Shallow creates new symlink to the dest of symlink. Shallow SymlinkAction = iota // Skip does nothing with symlink. Skip )
Click to show internal directories.
Click to hide internal directories.