Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GETLK is constant for F_OFD_GETLK GETLK = 36 // SETLK is constant for F_OFD_SETLK SETLK = 37 // SETLKW is constant for F_OFD_SETLKW SETLKW = 38 )
View Source
const Separator = string(filepath.Separator)
Variables ¶
This section is empty.
Functions ¶
func Mount ¶
Mount pfs to target, opts may be left nil.
TODO: support mounting repos from more than one project.
func NewLoopbackFile ¶
func NewLoopbackFile(fd int) fs.FileHandle
NewLoopbackFile creates a FileHandle out of a file descriptor. All operations are implemented.
Types ¶
type Options ¶
type Options struct { Fuse *fs.Options // Write indicates that the pfs mount should allow writes. // Writes will be written back to the filesystem. Write bool // RepoOptions is a map from mount names to options associated with them. RepoOptions map[string]*RepoOptions // Unmount is a channel that will be closed when the filesystem has been // unmounted. It can be nil in which case it's ignored. Unmount chan struct{} }
Options is for configuring fuse mounts. Any of the fields may be left nil and `nil` itself is a valid set of Options which uses the default for everything.
type RepoOptions ¶
type RepoOptions struct { // Name is the name _of the mount_. This is needed because the mount might // have a different name to the repo, to support mounting multiple versions // of the same repo at the same time. Name string File *pfs.File // Repo is the name of the repo to mount // Repo string // Branch is the branch of the repo to mount // Branch string // Commit is a specific commit on the branch to mount // Commit string // Write indicates that the repo should be mounted for writing. Write bool }
RepoOptions are the options associated with a mounted repo.
Click to show internal directories.
Click to hide internal directories.