Documentation
¶
Overview ¶
Package filesystem contains shared manifest and route helpers for file browser plugins backed by different remote filesystem protocols.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
Home(ctx context.Context) (string, error)
ReadDir(ctx context.Context, p string) ([]os.FileInfo, error)
Stat(ctx context.Context, p string) (os.FileInfo, error)
Open(ctx context.Context, p string) (io.ReadCloser, error)
Write(ctx context.Context, p string, r io.Reader) error
Mkdir(ctx context.Context, p string) error
Rename(ctx context.Context, from, to string) error
Remove(ctx context.Context, p string, isDir bool) error
}
type ErrorMapper ¶
type FileContent ¶
type FilesOption ¶
type FilesOption func(*plugin.FileBrowserConfig)
FilesOption opts a FilesTab into the bulk-operation slots a backend supports.
func WithArchive ¶
func WithArchive(prefix string) FilesOption
func WithChmod ¶
func WithChmod(prefix string) FilesOption
func WithCopy ¶
func WithCopy(prefix string) FilesOption
func WithMove ¶
func WithMove(prefix string) FilesOption
WithMove populates the move bulk slot so the renderer surfaces that action. A backend opts in only for ops it implements; sibling options cover copy, chmod, and archive.
type RangeOpener ¶
type RangeOpener interface {
OpenRange(ctx context.Context, p string, offset, length int64) (io.ReadCloser, error)
}
RangeOpener is an optional Client capability for backends that read from an offset but cannot seek. length <= 0 means to EOF.
Click to show internal directories.
Click to hide internal directories.