Documentation ¶
Overview ¶
Package libdokan is an interface between libkbfs and dokan.
Index ¶
- Constants
- func Start(options StartOptions, kbCtx libkbfs.Context) *libfs.Error
- type Alias
- func (t Alias) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t Alias) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t Alias) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t Alias) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (t Alias) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (t Alias) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (s *Alias) GetFileInformation(context.Context, *dokan.FileInfo) (a *dokan.Stat, err error)
- func (t Alias) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Alias) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Alias) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t Alias) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Alias) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Alias) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t Alias) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Alias) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t Alias) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Alias) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type CtxTagKey
- type Dir
- func (d *Dir) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) (err error)
- func (t Dir) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (d *Dir) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t Dir) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (d *Dir) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) (err error)
- func (t Dir) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (d *Dir) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
- func (t Dir) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Dir) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Dir) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t Dir) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Dir) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (d *Dir) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t Dir) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Dir) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Dir) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type EmptyFolder
- func (t EmptyFolder) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t EmptyFolder) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t EmptyFolder) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t EmptyFolder) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (*EmptyFolder) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) (err error)
- func (t EmptyFolder) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (*EmptyFolder) GetFileInformation(context.Context, *dokan.FileInfo) (a *dokan.Stat, err error)
- func (t EmptyFolder) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t EmptyFolder) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t EmptyFolder) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t EmptyFolder) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t EmptyFolder) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t EmptyFolder) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t EmptyFolder) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t EmptyFolder) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t EmptyFolder) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t EmptyFolder) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type FS
- func (f *FS) CreateFile(ctx context.Context, fi *dokan.FileInfo, cd *dokan.CreateData) (dokan.File, dokan.CreateStatus, error)
- func (f *FS) ErrorPrint(err error)
- func (f *FS) GetDiskFreeSpace(ctx context.Context) (freeSpace dokan.FreeSpace, err error)
- func (f *FS) GetVolumeInformation(ctx context.Context) (dokan.VolumeInformation, error)
- func (f *FS) MoveFile(ctx context.Context, src dokan.File, sourceFI *dokan.FileInfo, ...) (err error)
- func (f *FS) NotificationGroupWait()
- func (f *FS) Printf(fmt string, args ...interface{})
- func (f *FS) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername)
- func (f *FS) WithContext(ctx context.Context) (context.Context, context.CancelFunc)
- type FSO
- func (t FSO) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t FSO) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t FSO) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t FSO) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (t FSO) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (t FSO) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (t FSO) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t FSO) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t FSO) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t FSO) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t FSO) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t FSO) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t FSO) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (f *FSO) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, ...) (err error)
- func (t FSO) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t FSO) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type File
- func (t File) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (f *File) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (f *File) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t File) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (t File) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (f *File) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) (err error)
- func (f *File) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error)
- func (t File) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t File) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (f *File) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (n int, err error)
- func (f *File) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, newSize int64) (err error)
- func (f *File) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) (err error)
- func (f *File) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t File) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t File) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (f *File) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (n int, err error)
- type Folder
- type FolderList
- func (t FolderList) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t FolderList) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t FolderList) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t FolderList) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (fl *FolderList) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) (err error)
- func (t FolderList) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (*FolderList) GetFileInformation(context.Context, *dokan.FileInfo) (*dokan.Stat, error)
- func (t FolderList) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t FolderList) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t FolderList) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t FolderList) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t FolderList) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t FolderList) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t FolderList) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t FolderList) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t FolderList) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t FolderList) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type JournalControlFile
- type PrefetchFile
- type ProfileList
- func (t ProfileList) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t ProfileList) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t ProfileList) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t ProfileList) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (ProfileList) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) (err error)
- func (t ProfileList) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (ProfileList) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
- func (t ProfileList) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t ProfileList) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t ProfileList) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t ProfileList) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t ProfileList) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t ProfileList) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t ProfileList) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t ProfileList) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t ProfileList) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t ProfileList) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type ReclaimQuotaFile
- type RekeyFile
- type ResetCachesFile
- type Root
- func (t Root) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t Root) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t Root) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t Root) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (r *Root) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (t Root) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (r *Root) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error)
- func (t Root) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Root) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Root) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t Root) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Root) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Root) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t Root) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Root) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t Root) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Root) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type SpecialReadFile
- func NewArchiveRelTimeFile(fs *FS, handle *tlfhandle.Handle, filename string) *SpecialReadFile
- func NewErrorFile(fs *FS) *SpecialReadFile
- func NewFileInfoFile(fs *FS, dir libkbfs.Node, name string) *SpecialReadFile
- func NewMetricsFile(fs *FS) *SpecialReadFile
- func NewNonTLFStatusFile(fs *FS) *SpecialReadFile
- func NewTlfEditHistoryFile(folder *Folder) *SpecialReadFile
- func NewUpdateHistoryFile(folder *Folder) *SpecialReadFile
- func NewUserEditHistoryFile(folder *Folder) *SpecialReadFile
- func (t SpecialReadFile) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t SpecialReadFile) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t SpecialReadFile) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t SpecialReadFile) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (t SpecialReadFile) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (t SpecialReadFile) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (f *SpecialReadFile) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error)
- func (t SpecialReadFile) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t SpecialReadFile) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (f *SpecialReadFile) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t SpecialReadFile) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t SpecialReadFile) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t SpecialReadFile) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t SpecialReadFile) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t SpecialReadFile) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t SpecialReadFile) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t SpecialReadFile) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type StartOptions
- type Symlink
- func (t Symlink) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) error
- func (t Symlink) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (t Symlink) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t Symlink) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (t Symlink) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, ...) error
- func (t Symlink) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (s *Symlink) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error)
- func (t Symlink) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Symlink) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Symlink) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t Symlink) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Symlink) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t Symlink) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t Symlink) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t Symlink) SetFileTime(context.Context, *dokan.FileInfo, time.Time, time.Time, time.Time) error
- func (t Symlink) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t Symlink) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type SyncControlFile
- type SyncFromServerFile
- type TLF
- func (tlf *TLF) CanDeleteDirectory(ctx context.Context, fi *dokan.FileInfo) (err error)
- func (t TLF) CanDeleteFile(ctx context.Context, fi *dokan.FileInfo) error
- func (tlf *TLF) Cleanup(ctx context.Context, fi *dokan.FileInfo)
- func (t TLF) CloseFile(ctx context.Context, fi *dokan.FileInfo)
- func (tlf *TLF) FindFiles(ctx context.Context, fi *dokan.FileInfo, pattern string, ...) (err error)
- func (t TLF) FlushFileBuffers(ctx context.Context, fi *dokan.FileInfo) error
- func (tlf *TLF) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
- func (t TLF) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (t TLF) LockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t TLF) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- func (t TLF) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (t TLF) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) error
- func (tlf *TLF) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
- func (t TLF) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, ...) error
- func (tlf *TLF) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, ...) (err error)
- func (t TLF) UnlockFile(ctx context.Context, fi *dokan.FileInfo, offset int64, length int64) error
- func (t TLF) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
- type UnstageFile
- type UpdatesFile
Constants ¶
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 Dokan ID tag. CtxOpID = "DID" // WrongUserErrorFileName is the name of error directory for other users. WrongUserErrorFileName = `kbfs.access.denied.for.other.windows.users.txt` // WrongUserErrorContents is the contents of the file. WrongUserErrorContents = `Access to KBFS is limited to the windows user (sid) running KBFS.` )
const DefaultMountFlags = dokan.CurrentSession
DefaultMountFlags are the default mount flags for libdokan.
const HiddenFilePrefix = `._`
HiddenFilePrefix is the prefix for files to be hidden.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alias ¶
type Alias struct {
// contains filtered or unexported fields
}
Alias is a top-level folder accessed through its non-canonical name.
func (Alias) CanDeleteDirectory ¶
func (Alias) CanDeleteFile ¶
func (Alias) FlushFileBuffers ¶
func (*Alias) GetFileInformation ¶
GetFileInformation for dokan.
func (Alias) GetFileSecurity ¶
func (t Alias) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Alias) SetAllocationSize ¶
func (Alias) SetEndOfFile ¶
func (Alias) SetFileAttributes ¶
func (Alias) SetFileSecurity ¶
func (t Alias) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Alias) SetFileTime ¶
func (Alias) UnlockFile ¶
type Dir ¶
type Dir struct {
FSO
}
Dir represents KBFS subdirectories.
func (*Dir) CanDeleteDirectory ¶
CanDeleteDirectory - return just nil TODO check for permissions here.
func (Dir) CanDeleteFile ¶
func (*Dir) Cleanup ¶
Cleanup - forget references, perform deletions etc. If Cleanup is called with non-nil FileInfo that has IsDeleteOnClose() no libdokan locks should be held prior to the call.
func (*Dir) FindFiles ¶
func (d *Dir) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) (err error)
FindFiles does readdir for dokan.
func (Dir) FlushFileBuffers ¶
func (*Dir) GetFileInformation ¶
func (d *Dir) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
GetFileInformation for dokan.
func (Dir) GetFileSecurity ¶
func (t Dir) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Dir) SetAllocationSize ¶
func (Dir) SetEndOfFile ¶
func (*Dir) SetFileAttributes ¶
func (d *Dir) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
SetFileAttributes for Dokan.
func (Dir) SetFileSecurity ¶
func (t Dir) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Dir) UnlockFile ¶
type EmptyFolder ¶
type EmptyFolder struct {
// contains filtered or unexported fields
}
EmptyFolder represents an empty, read-only KBFS TLF that has not been created by someone with sufficient permissions.
func (EmptyFolder) CanDeleteDirectory ¶
func (EmptyFolder) CanDeleteFile ¶
func (*EmptyFolder) FindFiles ¶
func (*EmptyFolder) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) (err error)
FindFiles for dokan.
func (EmptyFolder) FlushFileBuffers ¶
func (*EmptyFolder) GetFileInformation ¶
GetFileInformation for dokan.
func (EmptyFolder) GetFileSecurity ¶
func (t EmptyFolder) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (EmptyFolder) SetAllocationSize ¶
func (EmptyFolder) SetEndOfFile ¶
func (EmptyFolder) SetFileAttributes ¶
func (EmptyFolder) SetFileSecurity ¶
func (t EmptyFolder) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (EmptyFolder) SetFileTime ¶
func (EmptyFolder) UnlockFile ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS implements the newfuse FS interface for KBFS.
func (*FS) CreateFile ¶
func (f *FS) CreateFile(ctx context.Context, fi *dokan.FileInfo, cd *dokan.CreateData) (dokan.File, dokan.CreateStatus, error)
CreateFile called from dokan, may be a file or directory.
func (*FS) ErrorPrint ¶
ErrorPrint prints errors from the Dokan library.
func (*FS) GetDiskFreeSpace ¶
GetDiskFreeSpace returns information about free space on the volume for dokan.
func (*FS) GetVolumeInformation ¶
GetVolumeInformation returns information about the whole filesystem for dokan.
func (*FS) MoveFile ¶
func (f *FS) MoveFile(ctx context.Context, src dokan.File, sourceFI *dokan.FileInfo, targetPath string, replaceExisting bool) (err error)
MoveFile tries to move a file.
func (*FS) NotificationGroupWait ¶
func (f *FS) NotificationGroupWait()
NotificationGroupWait waits till the local notification group is done.
func (*FS) UserChanged ¶
func (f *FS) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername)
UserChanged is called from libfs.
func (*FS) WithContext ¶
WithContext creates context for filesystem operations.
type FSO ¶
type FSO struct {
// contains filtered or unexported fields
}
FSO is a common type for file system objects, i.e. Dirs or Files.
func (FSO) CanDeleteDirectory ¶
func (FSO) CanDeleteFile ¶
func (FSO) FlushFileBuffers ¶
func (FSO) GetFileSecurity ¶
func (t FSO) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (FSO) SetAllocationSize ¶
func (FSO) SetEndOfFile ¶
func (FSO) SetFileAttributes ¶
func (FSO) SetFileSecurity ¶
func (t FSO) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (*FSO) SetFileTime ¶
func (f *FSO) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, lastAccess time.Time, lastWrite time.Time) (err error)
SetFileTime sets mtime for FSOs (File and Dir). TLFs have a separate SetFileTime.
func (FSO) UnlockFile ¶
type File ¶
type File struct {
FSO
}
File represents KBFS files.
func (File) CanDeleteDirectory ¶
func (*File) CanDeleteFile ¶
CanDeleteFile - return just nil TODO check for permissions here.
func (*File) Cleanup ¶
Cleanup - for dokan, remember to handle deletions. If Cleanup is called with non-nil FileInfo that has IsDeleteOnClose() no libdokan locks should be held prior to the call.
func (*File) FlushFileBuffers ¶
FlushFileBuffers performs a (f)sync.
func (*File) GetFileInformation ¶
func (f *File) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error)
GetFileInformation for dokan.
func (File) GetFileSecurity ¶
func (t File) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (*File) ReadFile ¶
func (f *File) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (n int, err error)
ReadFile for dokan reads.
func (*File) SetAllocationSize ¶
func (f *File) SetAllocationSize(ctx context.Context, fi *dokan.FileInfo, newSize int64) (err error)
SetAllocationSize for dokan (f)truncates but does not grow file size (it may fallocate, but that is not done at the moment).
func (*File) SetEndOfFile ¶
SetEndOfFile for dokan (f)truncates.
func (*File) SetFileAttributes ¶
func (f *File) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
SetFileAttributes for Dokan.
func (File) SetFileSecurity ¶
func (t File) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (File) UnlockFile ¶
type Folder ¶
type Folder struct {
// contains filtered or unexported fields
}
Folder represents KBFS top-level folders
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 ¶
LocalChange is called for changes originating within in this process.
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) CanDeleteDirectory ¶
func (FolderList) CanDeleteFile ¶
func (*FolderList) FindFiles ¶
func (fl *FolderList) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) (err error)
FindFiles for dokan.
func (FolderList) FlushFileBuffers ¶
func (*FolderList) GetFileInformation ¶
GetFileInformation for dokan.
func (FolderList) GetFileSecurity ¶
func (t FolderList) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (FolderList) SetAllocationSize ¶
func (FolderList) SetEndOfFile ¶
func (FolderList) SetFileAttributes ¶
func (FolderList) SetFileSecurity ¶
func (t FolderList) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (FolderList) SetFileTime ¶
func (FolderList) UnlockFile ¶
type JournalControlFile ¶
type JournalControlFile struct {
// contains filtered or unexported fields
}
JournalControlFile is a special file used to control journal settings.
func (*JournalControlFile) GetFileInformation ¶
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) GetFileInformation ¶
type ProfileList ¶
type ProfileList struct {
// contains filtered or unexported fields
}
ProfileList is a node that can list all of the available profiles.
func (ProfileList) CanDeleteDirectory ¶
func (ProfileList) CanDeleteFile ¶
func (ProfileList) FindFiles ¶
func (ProfileList) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) (err error)
FindFiles does readdir for dokan.
func (ProfileList) FlushFileBuffers ¶
func (ProfileList) GetFileInformation ¶
func (ProfileList) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
GetFileInformation for dokan.
func (ProfileList) GetFileSecurity ¶
func (t ProfileList) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (ProfileList) SetAllocationSize ¶
func (ProfileList) SetEndOfFile ¶
func (ProfileList) SetFileAttributes ¶
func (ProfileList) SetFileSecurity ¶
func (t ProfileList) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (ProfileList) SetFileTime ¶
func (ProfileList) UnlockFile ¶
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) GetFileInformation ¶
func (*ReclaimQuotaFile) WriteFile ¶
func (f *ReclaimQuotaFile) WriteFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (n int, err error)
WriteFile implements writes for dokan. 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) GetFileInformation ¶
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 only be reached from the top-level FS mount. 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 callers.
func (*ResetCachesFile) GetFileInformation ¶
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
Root represents the root of the KBFS file system.
func (Root) CanDeleteDirectory ¶
func (Root) CanDeleteFile ¶
func (*Root) FindFiles ¶
func (r *Root) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) error
FindFiles for dokan readdir.
func (Root) FlushFileBuffers ¶
func (*Root) GetFileInformation ¶
GetFileInformation for dokan stats.
func (Root) GetFileSecurity ¶
func (t Root) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Root) SetAllocationSize ¶
func (Root) SetEndOfFile ¶
func (Root) SetFileAttributes ¶
func (Root) SetFileSecurity ¶
func (t Root) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Root) SetFileTime ¶
func (Root) UnlockFile ¶
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 *tlfhandle.Handle, filename string) *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) *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) *SpecialReadFile
NewFileInfoFile returns a special file that contains a text representation of a file's KBFS metadata.
func NewMetricsFile ¶
func NewMetricsFile(fs *FS) *SpecialReadFile
NewMetricsFile returns a special read file that contains a text representation of all metrics.
func NewNonTLFStatusFile ¶
func NewNonTLFStatusFile(fs *FS) *SpecialReadFile
NewNonTLFStatusFile returns a special read file that contains a text representation of the global KBFS status.
func NewTlfEditHistoryFile ¶
func NewTlfEditHistoryFile(folder *Folder) *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) *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) *SpecialReadFile
NewUserEditHistoryFile returns a special read file that contains a text representation of the file edit history for the logged-in user.
func (SpecialReadFile) CanDeleteDirectory ¶
func (SpecialReadFile) CanDeleteFile ¶
func (SpecialReadFile) FlushFileBuffers ¶
func (*SpecialReadFile) GetFileInformation ¶
func (f *SpecialReadFile) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error)
GetFileInformation does stats for dokan.
func (SpecialReadFile) GetFileSecurity ¶
func (t SpecialReadFile) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (*SpecialReadFile) ReadFile ¶
func (f *SpecialReadFile) ReadFile(ctx context.Context, fi *dokan.FileInfo, bs []byte, offset int64) (int, error)
ReadFile does reads for dokan.
func (SpecialReadFile) SetAllocationSize ¶
func (SpecialReadFile) SetEndOfFile ¶
func (SpecialReadFile) SetFileAttributes ¶
func (SpecialReadFile) SetFileSecurity ¶
func (t SpecialReadFile) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (SpecialReadFile) SetFileTime ¶
func (SpecialReadFile) UnlockFile ¶
type StartOptions ¶
type StartOptions struct { KbfsParams libkbfs.InitParams RuntimeDir string Label string DokanConfig dokan.Config ForceMount bool SkipMount bool MountPoint string }
StartOptions are options for starting up
type Symlink ¶
type Symlink struct {
// contains filtered or unexported fields
}
Symlink represents KBFS symlinks.
func (Symlink) CanDeleteDirectory ¶
func (Symlink) CanDeleteFile ¶
func (Symlink) FlushFileBuffers ¶
func (*Symlink) GetFileInformation ¶
func (s *Symlink) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error)
GetFileInformation does stat for dokan.
func (Symlink) GetFileSecurity ¶
func (t Symlink) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Symlink) SetAllocationSize ¶
func (Symlink) SetEndOfFile ¶
func (Symlink) SetFileAttributes ¶
func (Symlink) SetFileSecurity ¶
func (t Symlink) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (Symlink) SetFileTime ¶
func (Symlink) UnlockFile ¶
type SyncControlFile ¶
type SyncControlFile struct {
// contains filtered or unexported fields
}
SyncControlFile is a special file used to control sync settings.
func (*SyncControlFile) GetFileInformation ¶
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) GetFileInformation ¶
type TLF ¶
type TLF struct {
// contains filtered or unexported fields
}
TLF represents the root directory of a TLF. It wraps a lazy-loaded Dir.
func (*TLF) CanDeleteDirectory ¶
CanDeleteDirectory - return just nil because tlfs can always be removed from favorites.
func (TLF) CanDeleteFile ¶
func (*TLF) FindFiles ¶
func (tlf *TLF) FindFiles(ctx context.Context, fi *dokan.FileInfo, pattern string, callback func(*dokan.NamedStat) error) (err error)
FindFiles does readdir for dokan.
func (TLF) FlushFileBuffers ¶
func (*TLF) GetFileInformation ¶
func (tlf *TLF) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error)
GetFileInformation for dokan.
func (TLF) GetFileSecurity ¶
func (t TLF) GetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (TLF) SetAllocationSize ¶
func (TLF) SetEndOfFile ¶
func (*TLF) SetFileAttributes ¶
func (tlf *TLF) SetFileAttributes(ctx context.Context, fi *dokan.FileInfo, fileAttributes dokan.FileAttribute) error
SetFileAttributes for Dokan.
func (TLF) SetFileSecurity ¶
func (t TLF) SetFileSecurity(ctx context.Context, fi *dokan.FileInfo, si winacl.SecurityInformation, sd *winacl.SecurityDescriptor) error
func (*TLF) SetFileTime ¶
func (tlf *TLF) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, lastAccess time.Time, lastWrite time.Time) (err error)
SetFileTime sets mtime for FSOs (File and Dir).
func (TLF) UnlockFile ¶
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) GetFileInformation ¶
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) GetFileInformation ¶
Source Files ¶
- alias.go
- archive_reltime_file.go
- common.go
- dir.go
- doc.go
- dokan_info.go
- dummy.go
- empty_folder.go
- emptyfs.go
- error_file.go
- fakeroot.go
- file.go
- file_info_file.go
- folderlist.go
- fs.go
- fso.go
- journal_control_file.go
- metrics_file.go
- mounter.go
- prefetch_file.go
- profilelist.go
- reclaim_quota_file.go
- rekey_file.go
- reset_caches_file.go
- special_files.go
- special_read_file.go
- special_write_file.go
- start.go
- status_file.go
- symlink.go
- sync_control_file.go
- sync_from_server_file.go
- tlf.go
- tlf_edit_history_file.go
- unstage_file.go
- update_history_file.go
- updates_file.go
- user_edit_history.go