Documentation
¶
Index ¶
- type VFS
- type VFSDir
- func (dir *VFSDir) Attr(ctx context.Context, attr *fuse.Attr) error
- func (dir *VFSDir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
- func (dir *VFSDir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)
- func (dir *VFSDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)
- type VFSFile
- type VFSFileHandler
- func (vfh *VFSFileHandler) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (vfh *VFSFileHandler) Release(ctx context.Context, req *fuse.ReleaseRequest) error
- func (vfh *VFSFileHandler) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VFS ¶
type VFS struct {
// contains filtered or unexported fields
}
VFS represent Virtual System
func NewVFileSystem ¶
NewVFileSystem creates a new Virtual FileSystem object
func (*VFS) IsMounted ¶
IsMounted returns true if the vfs still has a valid connection to the mounted path
func (*VFS) Root ¶
Root complies with the Fuse Interface that returns the Root Node of our file system
type VFSDir ¶
type VFSDir struct {
// contains filtered or unexported fields
}
VFSDir represents a directory in the Virtual file system
func (*VFSDir) Create ¶
func (dir *VFSDir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
Create is invoked when a new directory is to be created It implements the fs.NodeCreator interface
type VFSFile ¶
type VFSFile struct {
// contains filtered or unexported fields
}
VFSFile represents a file in the Virtual file system
func (*VFSFile) Access ¶ added in v0.0.19
Access implements the fs.NodeAccesser interface for File. This is necessary for macOS to correctly identify plaintext files as plaintext. If not implemented, bazil-fuse returns a nil error for every call, so when macOS checks for executable bit using Access (instead of Attr!), it gets a success, which makes it think the file is executable, yielding a "Unix executable" UTI.
type VFSFileHandler ¶
type VFSFileHandler struct {
// contains filtered or unexported fields
}
VFSFileHandler manages readings and closing access to a VFSFile
func NewVFSFileHandler ¶
func NewVFSFileHandler(ctx context.Context, vfile *VFSFile) (*VFSFileHandler, error)
func (*VFSFileHandler) Read ¶
func (vfh *VFSFileHandler) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
Read reads the content of the reader Ideally, decryption of the content of the file should be happening here
func (*VFSFileHandler) Release ¶
func (vfh *VFSFileHandler) Release(ctx context.Context, req *fuse.ReleaseRequest) error
Release closes the reader on this file handler
func (*VFSFileHandler) Write ¶
func (vfh *VFSFileHandler) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
Write writes content from request into the underlying file. Keeping track of offset and all Ideally, encryption of the content of the file should be happening here