Documentation ¶
Index ¶
- func NewFileHandle(fd int, flags uint32, path string) fs.FileHandle
- type FileHandle
- type Node
- func (n *Node) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *Node) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *Node) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
- func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *Node) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *Node) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *Node) Opendir(ctx context.Context) syscall.Errno
- func (n *Node) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *Node) Release(ctx context.Context, f fs.FileHandle) syscall.Errno
- func (n *Node) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, ...) syscall.Errno
- func (n *Node) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *Node) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (n *Node) ToPath() *Path
- func (n *Node) Unlink(ctx context.Context, name string) syscall.Errno
- type OpenFile
- type OpenFilesTracker
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileHandle ¶
func NewFileHandle(fd int, flags uint32, path string) fs.FileHandle
Types ¶
type FileHandle ¶
type FileHandle struct { *bridgefs.BridgeFileHandle Flags uint32 Path string }
type Node ¶
type Node struct { *bridgefs.BridgeNode // contains filtered or unexported fields }
func (*Node) Create ¶
func (n *Node) Create(ctx context.Context, name string, flags uint32, mode uint32, out *fuse.EntryOut) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
Create will create a new file. At this point the file shouldn't exist. However, because multiple users could be uploading files, there is a chance it does exist. If that happens then a new version of the file is created instead.
func (*Node) Getxattr ¶
Getxattr returns extra attributes. This is used by lstat. There are no extra attributes to return so we always return a 0 for buffer length and success.
func (*Node) Lookup ¶
func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
Lookup will return information about the current entry.
func (*Node) Mkdir ¶
func (n *Node) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
Mkdir will create a new directory. If an attempt is made to create an existing directory then it will return the existing directory rather than returning an error.
func (*Node) Open ¶
func (n *Node) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
Open will open an existing file.
func (*Node) Release ¶
Release will close the file handle and update meta data about the file in the database
type OpenFilesTracker ¶
type OpenFilesTracker struct {
// contains filtered or unexported fields
}
func NewOpenFilesTracker ¶
func NewOpenFilesTracker() *OpenFilesTracker
func (*OpenFilesTracker) Delete ¶
func (t *OpenFilesTracker) Delete(path string)
func (*OpenFilesTracker) Get ¶
func (t *OpenFilesTracker) Get(path string) *OpenFile