rclone: github.com/ncw/rclone/cmd/mount Index | Files

package mount

import "github.com/ncw/rclone/cmd/mount"

Index

Package Files

dir.go file.go fs.go handle.go mount.go

func Mount Uses

func Mount(f fs.Fs, mountpoint string) error

Mount mounts the remote at mountpoint.

If noModTime is set then it

type Dir Uses

type Dir struct {
    *vfs.Dir
}

Dir represents a directory entry

func (*Dir) Attr Uses

func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) (err error)

Attr updates the attributes of a directory

func (*Dir) Create Uses

func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (node fusefs.Node, handle fusefs.Handle, err error)

Create makes a new file

func (*Dir) Fsync Uses

func (d *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error)

Fsync the directory

func (d *Dir) Link(ctx context.Context, req *fuse.LinkRequest, old fusefs.Node) (newNode fusefs.Node, err error)

Link creates a new directory entry in the receiver based on an existing Node. Receiver must be a directory.

func (*Dir) Lookup Uses

func (d *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fusefs.Node, err error)

Lookup looks up a specific entry in the receiver.

Lookup should return a Node corresponding to the entry. If the name does not exist in the directory, Lookup should return ENOENT.

Lookup need not to handle the names "." and "..".

func (*Dir) Mkdir Uses

func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (node fusefs.Node, err error)

Mkdir creates a new directory

func (*Dir) ReadDirAll Uses

func (d *Dir) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error)

ReadDirAll reads the contents of the directory

func (*Dir) Remove Uses

func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) (err error)

Remove removes the entry with the given name from the receiver, which must be a directory. The entry to be removed may correspond to a file (unlink) or to a directory (rmdir).

func (*Dir) Rename Uses

func (d *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fusefs.Node) (err error)

Rename the file

func (*Dir) Setattr Uses

func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) (err error)

Setattr handles attribute changes from FUSE. Currently supports ModTime only.

type FS Uses

type FS struct {
    *vfs.VFS
    // contains filtered or unexported fields
}

FS represents the top level filing system

func NewFS Uses

func NewFS(f fs.Fs) *FS

NewFS makes a new FS

func (*FS) Root Uses

func (f *FS) Root() (node fusefs.Node, err error)

Root returns the root node

func (*FS) Statfs Uses

func (f *FS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) (err error)

Statfs is called to obtain file system metadata. It should write that data to resp.

type File Uses

type File struct {
    *vfs.File
}

File represents a file

func (*File) Attr Uses

func (f *File) Attr(ctx context.Context, a *fuse.Attr) (err error)

Attr fills out the attributes for the file

func (*File) Fsync Uses

func (f *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error)

Fsync the file

Note that we don't do anything except return OK

func (*File) Getxattr Uses

func (f *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error

Getxattr gets an extended attribute by the given name from the node.

If there is no xattr by that name, returns fuse.ErrNoXattr.

func (*File) Listxattr Uses

func (f *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error

Listxattr lists the extended attributes recorded for the node.

func (*File) Open Uses

func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fh fusefs.Handle, err error)

Open the file for read or write

func (*File) Removexattr Uses

func (f *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error

Removexattr removes an extended attribute for the name.

If there is no xattr by that name, returns fuse.ErrNoXattr.

func (*File) Setattr Uses

func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) (err error)

Setattr handles attribute changes from FUSE. Currently supports ModTime and Size only

func (*File) Setxattr Uses

func (f *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error

Setxattr sets an extended attribute with the given name and value for the node.

type FileHandle Uses

type FileHandle struct {
    vfs.Handle
}

FileHandle is an open for read file handle on a File

func (*FileHandle) Flush Uses

func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) (err error)

Flush is called on each close() of a file descriptor. So if a filesystem wants to return write errors in close() and the file has cached dirty data, this is a good place to write back data and return any errors. Since many applications ignore close() errors this is not always useful.

NOTE: The flush() method may be called more than once for each open(). This happens if more than one file descriptor refers to an opened file due to dup(), dup2() or fork() calls. It is not possible to determine if a flush is final, so each flush should be treated equally. Multiple write-flush sequences are relatively rare, so this shouldn't be a problem.

Filesystems shouldn't assume that flush will always be called after some writes, or that if will be called at all.

func (*FileHandle) Read Uses

func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) (err error)

Read from the file handle

func (*FileHandle) Release Uses

func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) (err error)

Release is called when we are finished with the file handle

It isn't called directly from userspace so the error is ignored by the kernel

func (*FileHandle) Write Uses

func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) (err error)

Write data to the file handle

Package mount imports 17 packages (graph) and is imported by 8 packages. Updated 2019-05-21. Refresh now. Tools for package owners.