Documentation ¶
Index ¶
- type Dir
- type Drive
- type FS
- type File
- func (f *File) Attr(ctx context.Context, a *fuse.Attr) error
- func (f *File) Flush(ctx context.Context, req *fuse.FlushRequest) error
- func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (f *File) Release(ctx context.Context, req *fuse.ReleaseRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir struct { Type fuse.DirentType Attributes fuse.Attr // TODO: we must be able to find something better than interface{}, either a proper interface or perhaps a generic type // TODO: we likely don't need this: we should always call `materialiseFolder()` because the source of truth is pCloud // TODO: contents is subject to changes at anytime, and we should allow the fuse driver to be the judge of whether to // TODO: ... refresh the folder or not via fuse.Attr.Validate Entries map[string]interface{} // contains filtered or unexported fields }
Dir implements both Node and Handle for the root directory.
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS implements the pCloud file system.
type File ¶
type File struct { Type fuse.DirentType Content []byte Attributes fuse.Attr // contains filtered or unexported fields }
File implements both Node and Handle for the hello file.
func (*File) Flush ¶
Flush is called each time the file or directory is closed. Because there can be multiple file descriptors referring to a single opened file, Flush can be called multiple times.
func (*File) Open ¶
func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
func (*File) Read ¶
func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
Click to show internal directories.
Click to hide internal directories.