libfuse

package
v3.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2019 License: BSD-3-Clause, BSD-3-Clause, BSD-3-Clause Imports: 42 Imported by: 0

README

Library code gluing together KBFS and the FUSE protocol.

(TODO: Fill in more details.)

Documentation

Index

Constants

View Source
const (
	// PublicName is the name of the parent of all public top-level folders.
	PublicName = "public"

	// PrivateName is the name of the parent of all private top-level folders.
	PrivateName = "private"

	// TeamName is the name of the parent of all team top-level folders.
	TeamName = "team"

	// CtxOpID is the display name for the unique operation FUSE ID tag.
	CtxOpID = "FID"
)

Variables

This section is empty.

Functions

func GetPlatformSpecificMountOptionsForTest

func GetPlatformSpecificMountOptionsForTest() []fuse.MountOption

GetPlatformSpecificMountOptionsForTest makes cross-platform tests work

func GetPlatformUsageString

func GetPlatformUsageString() string

GetPlatformUsageString returns a string to be included in a usage string corresponding to the flags added by AddPlatformFlags.

func MakeFuseDebugFn

func MakeFuseDebugFn(
	log logger.Logger, superVerbose bool) func(msg interface{})

MakeFuseDebugFn returns a function that logs its argument to the given log, suitable to assign to fuse.Debug.

func Start

func Start(options StartOptions, kbCtx libkbfs.Context) *libfs.Error

Start the filesystem

Types

type Alias

type Alias struct {
	// contains filtered or unexported fields
}

Alias represents an alias. A use case for it is a top-level folder accessed through its non-canonical name.

func (*Alias) Attr

func (*Alias) Attr(ctx context.Context, a *fuse.Attr) error

Attr implements the fs.Node interface for Alias.

func (a *Alias) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error)

Readlink implements the fs.NodeReadlinker interface for Alias.

type CtxTagKey

type CtxTagKey int

CtxTagKey is the type used for unique context tags

const (
	// CtxIDKey is the type of the tag for unique operation IDs.
	CtxIDKey CtxTagKey = iota
)

type DebugServerFile

type DebugServerFile struct {
	// contains filtered or unexported fields
}

DebugServerFile represents a write-only file where any write of at least one byte triggers either disabling or enabling the debug server. For enabling, the port number to listen on (with localhost) must be what is written, e.g.

echo 8080 > /keybase/.kbfs_enable_debug_server

will spawn the HTTP debug server on port 8080.

func (*DebugServerFile) Attr

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

Attr implements the fs.Node interface for DebugServerFile.

func (*DebugServerFile) Write

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

Write implements the fs.HandleWriter interface for DebugServerFile.

type Dir

type Dir struct {
	XattrHandler
	// contains filtered or unexported fields
}

Dir represents a subdirectory of a KBFS top-level folder (including the TLF root directory itself).

func (*Dir) Access

func (d *Dir) Access(ctx context.Context, r *fuse.AccessRequest) (err error)

Access implements the fs.NodeAccesser interface for File. See comment for File.Access for more details.

func (*Dir) Attr

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

Attr implements the fs.Node interface for Dir.

func (*Dir) Create

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

Create implements the fs.NodeCreater interface for Dir.

func (*Dir) Forget

func (d *Dir) Forget()

Forget kernel reference to this node.

func (*Dir) Fsync

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

Fsync implements the fs.NodeFsyncer interface for Dir.

func (*Dir) Lookup

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

Lookup implements the fs.NodeRequestLookuper interface for Dir.

func (*Dir) Mkdir

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

Mkdir implements the fs.NodeMkdirer interface for Dir.

func (*Dir) ReadDirAll

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

ReadDirAll implements the fs.NodeReadDirAller interface for Dir.

func (*Dir) Remove

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

Remove implements the fs.NodeRemover interface for Dir.

func (*Dir) Rename

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

Rename implements the fs.NodeRenamer interface for Dir.

func (*Dir) Setattr

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

Setattr implements the fs.NodeSetattrer interface for Dir.

func (d *Dir) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (
	node fs.Node, err error)

Symlink implements the fs.NodeSymlinker interface for Dir.

type DirInterface

DirInterface gathers all the interfaces a Dir or something that wraps a Dir should implement.

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS implements the newfuse FS interface for KBFS.

func NewFS

func NewFS(config libkbfs.Config, conn *fuse.Conn, debug bool,
	platformParams PlatformParams) *FS

NewFS creates an FS. Note that this isn't the only constructor; see makeFS in libfuse/mount_test.go.

func (*FS) LaunchNotificationProcessor

func (f *FS) LaunchNotificationProcessor(ctx context.Context)

LaunchNotificationProcessor launches the notification processor.

func (*FS) NotificationGroupWait

func (f *FS) NotificationGroupWait()

NotificationGroupWait - wait on the notification group.

func (*FS) Root

func (f *FS) Root() (fs.Node, error)

Root implements the fs.FS interface for FS.

func (*FS) Serve

func (f *FS) Serve(ctx context.Context) error

Serve FS. Will block.

func (*FS) SetFuseConn

func (f *FS) SetFuseConn(fuse *fs.Server, conn *fuse.Conn)

SetFuseConn sets fuse connection for this FS.

func (*FS) Statfs

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

Statfs implements the fs.FSStatfser interface for FS.

func (*FS) UserChanged

func (f *FS) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername)

UserChanged is called from libfs.

func (*FS) WithContext

func (f *FS) WithContext(ctx context.Context) context.Context

WithContext adds app- and request-specific values to the context. libkbfs.NewContextWithCancellationDelayer is called before returning the context to ensure the cancellation is controllable.

It is called by FUSE for normal runs, but may be called explicitly in other settings, such as tests.

type File

type File struct {
	XattrHandler
	// contains filtered or unexported fields
}

File represents KBFS files.

func (*File) Access

func (f *File) Access(ctx context.Context, r *fuse.AccessRequest) (err error)

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.

func (*File) Attr

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

Attr implements the fs.Node interface for File.

func (*File) Forget

func (f *File) Forget()

Forget kernel reference to this node.

func (*File) Fsync

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

Fsync implements the fs.NodeFsyncer interface for File.

func (*File) Read

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

Read implements the fs.HandleReader interface for File.

func (*File) Setattr

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

Setattr implements the fs.NodeSetattrer interface for File.

func (*File) Write

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

Write implements the fs.HandleWriter interface for File.

type Folder

type Folder struct {
	// contains filtered or unexported fields
}

Folder represents the info shared among all nodes of a KBFS top-level folder.

func (*Folder) BatchChanges

func (f *Folder) BatchChanges(
	ctx context.Context, changes []libkbfs.NodeChange, _ []libkbfs.NodeID)

BatchChanges is called for changes originating anywhere, including other hosts.

func (*Folder) LocalChange

func (f *Folder) LocalChange(ctx context.Context, node libkbfs.Node, write libkbfs.WriteRange)

LocalChange is called for changes originating within in this process.

func (*Folder) TlfHandleChange

func (f *Folder) TlfHandleChange(ctx context.Context,
	newHandle *libkbfs.TlfHandle)

TlfHandleChange is called when the name of a folder changes. Note that newHandle may be nil. Then the handle in the folder is used. This is used on e.g. logout/login.

type FolderList

type FolderList struct {
	// contains filtered or unexported fields
}

FolderList is a node that can list all of the logged-in user's favorite top-level folders, on either a public or private basis.

func (*FolderList) Access

func (*FolderList) Access(ctx context.Context, r *fuse.AccessRequest) error

Access implements fs.NodeAccesser interface for *FolderList.

func (*FolderList) Attr

func (fl *FolderList) Attr(ctx context.Context, a *fuse.Attr) error

Attr implements the fs.Node interface.

func (*FolderList) Create

func (fl *FolderList) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (_ fs.Node, _ fs.Handle, err error)

Create implements the fs.NodeCreater interface for FolderList.

func (*FolderList) Lookup

func (fl *FolderList) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fs.Node, err error)

Lookup implements the fs.NodeRequestLookuper interface.

func (*FolderList) Mkdir

func (fl *FolderList) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (_ fs.Node, err error)

Mkdir implements the fs.NodeMkdirer interface for FolderList.

func (*FolderList) PathType

func (fl *FolderList) PathType() libkbfs.PathType

PathType returns PathType for this folder

func (*FolderList) ReadDirAll

func (fl *FolderList) ReadDirAll(ctx context.Context) (res []fuse.Dirent, err error)

ReadDirAll implements the ReadDirAll interface.

func (*FolderList) Remove

func (fl *FolderList) Remove(ctx context.Context, req *fuse.RemoveRequest) (err error)

Remove implements the fs.NodeRemover interface for FolderList.

type JournalControlFile

type JournalControlFile struct {
	// contains filtered or unexported fields
}

JournalControlFile is a special file used to control journal settings.

func (*JournalControlFile) Attr

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

Attr implements the fs.Node interface for JournalControlFile.

func (*JournalControlFile) Write

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

Write implements the fs.HandleWriter interface for JournalControlFile.

type NoXattrHandler

type NoXattrHandler struct{}

NoXattrHandler is a Xattr handler that always returns fuse.ENOTSUP.

func (NoXattrHandler) Getxattr

Getxattr implements the fs.NodeGetxattrer interface.

func (NoXattrHandler) Removexattr

Removexattr implements the fs.NodeRemovexattrer interface.

func (NoXattrHandler) Setxattr

Setxattr implements the fs.NodeSetxattrer interface.

type PlatformParams

type PlatformParams struct{}

PlatformParams contains all platform-specific parameters to be passed to New{Default,Force}Mounter.

func AddPlatformFlags

func AddPlatformFlags(flags *flag.FlagSet) *PlatformParams

AddPlatformFlags adds platform-specific flags to the given FlagSet and returns a PlatformParams object that will be filled in when the given FlagSet is parsed.

type PrefetchFile

type PrefetchFile struct {
	// contains filtered or unexported fields
}

PrefetchFile represents a write-only file where any write of at least one byte triggers either disabling or enabling prefetching. It is mainly useful for testing.

func (*PrefetchFile) Attr

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

Attr implements the fs.Node interface for PrefetchFile.

func (*PrefetchFile) Write

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

Write implements the fs.HandleWriter interface for PrefetchFile.

type ProfileList

type ProfileList struct{}

ProfileList is a node that can list all of the available profiles.

func (ProfileList) Attr

func (ProfileList) Attr(_ context.Context, a *fuse.Attr) error

Attr implements the fs.Node interface.

func (ProfileList) Lookup

func (pl ProfileList) Lookup(_ context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fs.Node, err error)

Lookup implements the fs.NodeRequestLookuper interface.

func (ProfileList) ReadDirAll

func (pl ProfileList) ReadDirAll(_ context.Context) (res []fuse.Dirent, err error)

ReadDirAll implements the ReadDirAll interface.

func (ProfileList) Remove

func (ProfileList) Remove(_ context.Context, req *fuse.RemoveRequest) (err error)

Remove implements the fs.NodeRemover interface for ProfileList.

type ReclaimQuotaFile

type ReclaimQuotaFile struct {
	// contains filtered or unexported fields
}

ReclaimQuotaFile represents a write-only file when any write of at least one byte triggers a quota reclamation of the folder.

func (*ReclaimQuotaFile) Attr

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

Attr implements the fs.Node interface for ReclaimQuotaFile.

func (*ReclaimQuotaFile) Write

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

Write implements the fs.HandleWriter interface for ReclaimQuotaFile. Note a write triggers quota reclamation, but does not wait for it to finish. If you want to wait, write to SyncFromServerFileName.

type RekeyFile

type RekeyFile struct {
	// contains filtered or unexported fields
}

RekeyFile represents a write-only file when any write of at least one byte triggers a rekey of the folder.

func (*RekeyFile) Attr

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

Attr implements the fs.Node interface for RekeyFile.

func (*RekeyFile) Write

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

Write implements the fs.HandleWriter interface for RekeyFile.

type ResetCachesFile

type ResetCachesFile struct {
	// contains filtered or unexported fields
}

ResetCachesFile represents a write-only file where any write of at least one byte triggers the resetting of all data caches. It can be reached from any directory under the FUSE mountpoint. Note that it does not clear the *node* cache, which means that the BlockPointers for existing nodes are still cached, such that directory listings can still be implicitly cached for nodes still being held by the kernel.

func (*ResetCachesFile) Attr

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

Attr implements the fs.Node interface for ResetCachesFile.

func (*ResetCachesFile) Write

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

Write implements the fs.HandleWriter interface for ResetCachesFile.

type Root

type Root struct {
	// contains filtered or unexported fields
}

Root represents the root of the KBFS file system.

func (*Root) Access

func (*Root) Access(ctx context.Context, r *fuse.AccessRequest) error

Access implements fs.NodeAccesser interface for *Root.

func (*Root) Attr

func (*Root) Attr(ctx context.Context, a *fuse.Attr) error

Attr implements the fs.Node interface for Root.

func (*Root) Create

func (r *Root) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (_ fs.Node, _ fs.Handle, err error)

Create implements the fs.NodeCreater interface for Root.

func (*Root) Lookup

func (r *Root) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (_ fs.Node, err error)

Lookup implements the fs.NodeRequestLookuper interface for Root.

func (*Root) Mkdir

func (r *Root) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (_ fs.Node, err error)

Mkdir implements the fs.NodeMkdirer interface for Root.

func (*Root) PathType

func (r *Root) PathType() libkbfs.PathType

PathType returns PathType for this folder

func (*Root) ReadDirAll

func (r *Root) ReadDirAll(ctx context.Context) (res []fuse.Dirent, err error)

ReadDirAll implements the ReadDirAll interface for Root.

type SpecialReadFile

type SpecialReadFile struct {
	// contains filtered or unexported fields
}

SpecialReadFile represents a file whose contents are determined by a function.

func NewArchiveRelTimeFile

func NewArchiveRelTimeFile(
	fs *FS, handle *libkbfs.TlfHandle, filename string,
	entryValid *time.Duration) *SpecialReadFile

NewArchiveRelTimeFile returns a special read file that contains a by-revision directory name that corresponds to the given relative time string for the given folder.

func NewErrorFile

func NewErrorFile(fs *FS, entryValid *time.Duration) *SpecialReadFile

NewErrorFile returns a special read file that contains a text representation of the last few KBFS errors.

func NewFileInfoFile

func NewFileInfoFile(
	fs *FS, dir libkbfs.Node, name string,
	entryValid *time.Duration) *SpecialReadFile

NewFileInfoFile returns a special file that contains a text representation of a file's KBFS metadata.

func NewMetricsFile

func NewMetricsFile(fs *FS, entryValid *time.Duration) *SpecialReadFile

NewMetricsFile returns a special read file that contains a text representation of all metrics.

func NewNonTLFStatusFile

func NewNonTLFStatusFile(fs *FS, entryValid *time.Duration) *SpecialReadFile

NewNonTLFStatusFile returns a special read file that contains a text representation of the global KBFS status.

func NewTLFStatusFile

func NewTLFStatusFile(
	folder *Folder, entryValid *time.Duration) *SpecialReadFile

NewTLFStatusFile returns a special read file that contains a text representation of the status of the current TLF.

func NewTlfEditHistoryFile

func NewTlfEditHistoryFile(
	folder *Folder, entryValid *time.Duration) *SpecialReadFile

NewTlfEditHistoryFile returns a special read file that contains a text representation of the file edit history for that TLF.

func NewUpdateHistoryFile

func NewUpdateHistoryFile(
	folder *Folder, entryValid *time.Duration) *SpecialReadFile

NewUpdateHistoryFile returns a special read file that contains a text representation of the update history of the current TLF.

func NewUserEditHistoryFile

func NewUserEditHistoryFile(
	folder *Folder, entryValid *time.Duration) *SpecialReadFile

NewUserEditHistoryFile returns a special read file that contains a text representation of the file edit history for the logged-in user.

func (*SpecialReadFile) Attr

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

Attr implements the fs.Node interface for SpecialReadFile.

func (*SpecialReadFile) Open

Open implements the fs.NodeOpener interface for SpecialReadFile.

type StartOptions

type StartOptions struct {
	KbfsParams        libkbfs.InitParams
	PlatformParams    PlatformParams
	RuntimeDir        string
	Label             string
	ForceMount        bool
	MountErrorIsFatal bool
	SkipMount         bool
	MountPoint        string
}

StartOptions are options for starting up

type Symlink struct {
	// contains filtered or unexported fields
}

Symlink represents KBFS symlinks.

func (*Symlink) Attr

func (s *Symlink) Attr(ctx context.Context, a *fuse.Attr) (err error)

Attr implements the fs.Node interface for Symlink

func (s *Symlink) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (link string, err error)

Readlink implements the fs.NodeReadlinker interface for Symlink

type SyncControlFile

type SyncControlFile struct {
	// contains filtered or unexported fields
}

SyncControlFile is a special file used to control sync settings.

func (*SyncControlFile) Attr

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

Attr implements the fs.Node interface for SyncControlFile.

func (*SyncControlFile) Write

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

Write implements the fs.HandleWriter interface for SyncControlFile.

type SyncFromServerFile

type SyncFromServerFile struct {
	// contains filtered or unexported fields
}

SyncFromServerFile represents a write-only file when any write of at least one byte triggers a sync of the folder from the server. A sync:

  • Waits for any outstanding conflict resolution tasks to finish (and it fails if the TLF is still in staged mode after waiting for CR).
  • Checks with the server for what the latest revision is for the folder.
  • Fetches and applies any missing revisions.
  • Waits for all outstanding block archive tasks to complete.
  • Waits for all outstanding quota reclamation tasks to complete.

func (*SyncFromServerFile) Attr

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

Attr implements the fs.Node interface for SyncFromServerFile.

func (*SyncFromServerFile) Write

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

Write implements the fs.HandleWriter interface for SyncFromServerFile.

type TLF

type TLF struct {

	// We never set quarantine on TLF roots, so don't bother with getting a dir
	// and calling the method on it. Instead, just use this dumb handler to
	// always return fuse.ENOTSUP.
	NoXattrHandler
	// contains filtered or unexported fields
}

TLF represents the root directory of a TLF. It wraps a lazy-loaded Dir.

func (*TLF) Access

func (tlf *TLF) Access(ctx context.Context, r *fuse.AccessRequest) error

Access implements the fs.NodeAccesser interface for *TLF.

func (*TLF) Attr

func (tlf *TLF) Attr(ctx context.Context, a *fuse.Attr) error

Attr implements the fs.Node interface for TLF.

func (*TLF) Create

func (tlf *TLF) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

Create implements the fs.NodeCreater interface for TLF.

func (*TLF) Forget

func (tlf *TLF) Forget()

Forget kernel reference to this node.

func (*TLF) Fsync

func (tlf *TLF) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error)

Fsync implements the fs.NodeFsyncer interface for TLF.

func (*TLF) Lookup

func (tlf *TLF) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)

Lookup implements the fs.NodeRequestLookuper interface for TLF.

func (*TLF) Mkdir

func (tlf *TLF) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (_ fs.Node, err error)

Mkdir implements the fs.NodeMkdirer interface for TLF.

func (*TLF) Open

func (tlf *TLF) Open(ctx context.Context, req *fuse.OpenRequest,
	resp *fuse.OpenResponse) (fs.Handle, error)

Open implements the fs.NodeOpener interface for TLF.

func (*TLF) ReadDirAll

func (tlf *TLF) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll implements the fs.NodeReadDirAller interface for TLF.

func (*TLF) Remove

func (tlf *TLF) Remove(ctx context.Context, req *fuse.RemoveRequest) error

Remove implements the fs.NodeRemover interface for TLF.

func (*TLF) Rename

func (tlf *TLF) Rename(ctx context.Context, req *fuse.RenameRequest,
	newDir fs.Node) error

Rename implements the fs.NodeRenamer interface for TLF.

func (*TLF) Setattr

func (tlf *TLF) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

Setattr implements the fs.NodeSetattrer interface for TLF.

func (tlf *TLF) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (
	fs.Node, error)

Symlink implements the fs.NodeSymlinker interface for TLF.

type UnstageFile

type UnstageFile struct {
	// contains filtered or unexported fields
}

UnstageFile represents a write-only file when any write of at least one byte triggers unstaging all unmerged commits and fast-forwarding to the current master.

func (*UnstageFile) Attr

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

Attr implements the fs.Node interface for UnstageFile.

func (*UnstageFile) Write

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

Write implements the fs.HandleWriter interface for UnstageFile.

type UpdatesFile

type UpdatesFile struct {
	// contains filtered or unexported fields
}

UpdatesFile represents a write-only file where any write of at least one byte triggers either disabling remote folder updates and conflict resolution, or re-enabling both. It is mainly useful for testing.

func (*UpdatesFile) Attr

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

Attr implements the fs.Node interface for UpdatesFile.

func (*UpdatesFile) Write

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

Write implements the fs.HandleWriter interface for UpdatesFile.

type XattrHandler

type XattrHandler interface {
	fs.NodeGetxattrer
	fs.NodeSetxattrer
	fs.NodeRemovexattrer
}

XattrHandler is an interface that includes fuse Get/Set/Remove calls for xattr.

func NewQuarantineXattrHandler

func NewQuarantineXattrHandler(libkbfs.Node, *Folder) XattrHandler

NewQuarantineXattrHandler returns a handler that doesn't handle Xattr calls on this platform.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL