Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry interface {
// Virtual returns the virtual file of this entry.
Virtual() string
// Actual returns the actual file mapped by this virtual file.
Actual() string
// Attr returns the attrs of this entry.
Attr() (*fuse.Attr, error)
// Readonly returns true if this virtual file is readonly.
Readonly() bool
// Parent returns the parent entry.
Parent() Entry
// Children returns the child entries.
Children() map[string]Entry
}
Entry is an interface for the virtual directory or file.
type FileSystem ¶
type FileSystem interface {
// MatchPath finds the actual file for the given virtual file, returning
// the deepest Entry object matched in the virtual file system and the
// remaining unmatched paths.
MatchPath(virtual string) (Entry, []string)
// Track tracks the mapping from virtual file to the actual file.
Track(virtual, actual string, readonly bool)
// Untrack removes the mapping from the given virtual file.
Untrack(virtual string) error
String() string
}
FileSystem is an interface to abstract file systems.
func New ¶
func New(actual string) (FileSystem, error)
New creates and returns a new FileSystem tracking the actual file.
Click to show internal directories.
Click to hide internal directories.