simplefs

package
v4.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: BSD-3-Clause, BSD-3-Clause, BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSimpleFS

func NewSimpleFS(appStateUpdater env.AppStateUpdater, config libkbfs.Config) keybase1.SimpleFSInterface

NewSimpleFS creates a new SimpleFS instance.

func Quarantine

func Quarantine(ctx context.Context, path string) error

Quarantine is for adding the mark of the web

Types

type SimpleFS

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

SimpleFS is the simple filesystem rpc layer implementation.

func (*SimpleFS) BatchChanges

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

BatchChanges implements the libkbfs.Observer interface for SimpleFS.

func (*SimpleFS) LocalChange

func (k *SimpleFS) LocalChange(
	ctx context.Context, node libkbfs.Node, _ libkbfs.WriteRange)

LocalChange implements the libkbfs.Observer interface for SimpleFS.

func (*SimpleFS) SimpleFSAreWeConnectedToMDServer

func (k *SimpleFS) SimpleFSAreWeConnectedToMDServer(ctx context.Context) (bool, error)

SimpleFSAreWeConnectedToMDServer implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSCancel

func (k *SimpleFS) SimpleFSCancel(_ context.Context, opid keybase1.OpID) error

SimpleFSCancel starts to cancel op with the given opid. Also remove any pending references of opid everywhere. Returns before cancellation is guaranteeded to be done - that may take some time. Currently always returns nil.

func (*SimpleFS) SimpleFSCheck

func (k *SimpleFS) SimpleFSCheck(
	ctx context.Context, opid keybase1.OpID) (keybase1.OpProgress, error)

SimpleFSCheck - Check progress of pending operation Progress variable is still TBD. Return errNoResult if no operation found.

func (*SimpleFS) SimpleFSCheckReachability

func (k *SimpleFS) SimpleFSCheckReachability(ctx context.Context) error

SimpleFSCheckReachability implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSClearConflictState

func (k *SimpleFS) SimpleFSClearConflictState(ctx context.Context,
	path keybase1.Path) error

SimpleFSClearConflictState implements the SimpleFS interface.

func (*SimpleFS) SimpleFSClose

func (k *SimpleFS) SimpleFSClose(ctx context.Context, opid keybase1.OpID) (err error)

SimpleFSClose - Close removes a handle associated with Open / List.

func (*SimpleFS) SimpleFSCopy

func (k *SimpleFS) SimpleFSCopy(ctx context.Context, arg keybase1.SimpleFSCopyArg) error

SimpleFSCopy - Begin copy of file or directory

func (*SimpleFS) SimpleFSCopyRecursive

func (k *SimpleFS) SimpleFSCopyRecursive(ctx context.Context,
	arg keybase1.SimpleFSCopyRecursiveArg) error

SimpleFSCopyRecursive - Begin recursive copy of directory

func (*SimpleFS) SimpleFSDeobfuscatePath

func (k *SimpleFS) SimpleFSDeobfuscatePath(
	ctx context.Context, path keybase1.Path) (res []string, err error)

SimpleFSDeobfuscatePath implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSDumpDebuggingInfo

func (k *SimpleFS) SimpleFSDumpDebuggingInfo(ctx context.Context) error

SimpleFSDumpDebuggingInfo - Instructs KBFS to dump debugging info into its logs.

func (*SimpleFS) SimpleFSFinishResolvingConflict

func (k *SimpleFS) SimpleFSFinishResolvingConflict(ctx context.Context,
	path keybase1.Path) error

SimpleFSFinishResolvingConflict implements the SimpleFS interface.

func (*SimpleFS) SimpleFSFolderEditHistory

func (k *SimpleFS) SimpleFSFolderEditHistory(
	ctx context.Context, path keybase1.Path) (
	res keybase1.FSFolderEditHistory, err error)

SimpleFSFolderEditHistory returns the edit history for the given TLF.

func (*SimpleFS) SimpleFSFolderSyncConfigAndStatus

func (k *SimpleFS) SimpleFSFolderSyncConfigAndStatus(
	ctx context.Context, path keybase1.Path) (
	keybase1.FolderSyncConfigAndStatus, error)

SimpleFSFolderSyncConfigAndStatus gets the given folder's sync config.

func (*SimpleFS) SimpleFSForceStuckConflict

func (k *SimpleFS) SimpleFSForceStuckConflict(
	ctx context.Context, path keybase1.Path) error

SimpleFSForceStuckConflict implements the SimpleFS interface.

func (*SimpleFS) SimpleFSGetHTTPAddressAndToken

func (k *SimpleFS) SimpleFSGetHTTPAddressAndToken(ctx context.Context) (
	resp keybase1.SimpleFSGetHTTPAddressAndTokenResponse, err error)

SimpleFSGetHTTPAddressAndToken returns a random token to be used for the local KBFS http server.

func (*SimpleFS) SimpleFSGetOps

func (k *SimpleFS) SimpleFSGetOps(_ context.Context) ([]keybase1.OpDescription, error)

SimpleFSGetOps - Get all the outstanding operations

func (*SimpleFS) SimpleFSGetRevisions

func (k *SimpleFS) SimpleFSGetRevisions(
	ctx context.Context, arg keybase1.SimpleFSGetRevisionsArg) (err error)

SimpleFSGetRevisions - Get revisions for a file

func (*SimpleFS) SimpleFSGetStats

func (k *SimpleFS) SimpleFSGetStats(ctx context.Context) (
	res keybase1.SimpleFSStats, err error)

SimpleFSGetStats implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSGetTeamQuotaUsage

func (k *SimpleFS) SimpleFSGetTeamQuotaUsage(
	ctx context.Context, teamName keybase1.TeamName) (
	res keybase1.SimpleFSQuotaUsage, err error)

SimpleFSGetTeamQuotaUsage returns the quota usage information for the given team.

func (*SimpleFS) SimpleFSGetUserQuotaUsage

func (k *SimpleFS) SimpleFSGetUserQuotaUsage(ctx context.Context) (
	res keybase1.SimpleFSQuotaUsage, err error)

SimpleFSGetUserQuotaUsage returns the quota usage information for the logged-in user.

func (*SimpleFS) SimpleFSList

func (k *SimpleFS) SimpleFSList(ctx context.Context, arg keybase1.SimpleFSListArg) error

SimpleFSList - Begin list of items in directory at path Retrieve results with readList() Cannot be a single file to get flags/status, must be a directory.

func (*SimpleFS) SimpleFSListFavorites

func (k *SimpleFS) SimpleFSListFavorites(ctx context.Context) (
	keybase1.FavoritesResult, error)

SimpleFSListFavorites lists the favorite, new, and ignored folders of the logged in user, getting its data from the KBFS Favorites cache. If the cache is stale, this will trigger a network request.

func (*SimpleFS) SimpleFSListRecursive

func (k *SimpleFS) SimpleFSListRecursive(ctx context.Context, arg keybase1.SimpleFSListRecursiveArg) error

SimpleFSListRecursive - Begin recursive list of items in directory at path

func (*SimpleFS) SimpleFSListRecursiveToDepth

func (k *SimpleFS) SimpleFSListRecursiveToDepth(ctx context.Context, arg keybase1.SimpleFSListRecursiveToDepthArg) error

SimpleFSListRecursiveToDepth - Begin recursive list of items in directory at path up to a given depth.

func (*SimpleFS) SimpleFSMakeOpid

func (k *SimpleFS) SimpleFSMakeOpid(_ context.Context) (keybase1.OpID, error)

SimpleFSMakeOpid - Convenience helper for generating new random value

func (*SimpleFS) SimpleFSMove

func (k *SimpleFS) SimpleFSMove(ctx context.Context, arg keybase1.SimpleFSMoveArg) error

SimpleFSMove - Begin move of file or directory, from/to KBFS only

func (*SimpleFS) SimpleFSObfuscatePath

func (k *SimpleFS) SimpleFSObfuscatePath(
	ctx context.Context, path keybase1.Path) (res string, err error)

SimpleFSObfuscatePath implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSOpen

func (k *SimpleFS) SimpleFSOpen(ctx context.Context, arg keybase1.SimpleFSOpenArg) (err error)

SimpleFSOpen - Create/open a file and leave it open or create a directory Files must be closed afterwards.

func (*SimpleFS) SimpleFSRead

func (k *SimpleFS) SimpleFSRead(ctx context.Context,
	arg keybase1.SimpleFSReadArg) (_ keybase1.FileContent, err error)

SimpleFSRead - Read (possibly partial) contents of open file, up to the amount specified by size. Repeat until zero bytes are returned or error. If size is zero, read an arbitrary amount.

func (*SimpleFS) SimpleFSReadList

func (k *SimpleFS) SimpleFSReadList(_ context.Context, opid keybase1.OpID) (keybase1.SimpleFSListResult, error)

SimpleFSReadList - Get list of Paths in progress. Can indicate status of pending to get more entries.

func (*SimpleFS) SimpleFSReadRevisions

func (k *SimpleFS) SimpleFSReadRevisions(
	_ context.Context, opid keybase1.OpID) (
	keybase1.GetRevisionsResult, error)

SimpleFSReadRevisions - Get list of revisions in progress. Can indicate status of pending to get more revisions.

func (*SimpleFS) SimpleFSRemove

func (k *SimpleFS) SimpleFSRemove(ctx context.Context,
	arg keybase1.SimpleFSRemoveArg) error

SimpleFSRemove - Remove file or directory from filesystem

func (*SimpleFS) SimpleFSRename

func (k *SimpleFS) SimpleFSRename(ctx context.Context, arg keybase1.SimpleFSRenameArg) (err error)

SimpleFSRename - Rename file or directory, KBFS side only

func (*SimpleFS) SimpleFSReset

func (k *SimpleFS) SimpleFSReset(
	ctx context.Context, path keybase1.Path) error

SimpleFSReset resets the given TLF.

func (*SimpleFS) SimpleFSSetDebugLevel

func (k *SimpleFS) SimpleFSSetDebugLevel(
	_ context.Context, level string) error

SimpleFSSetDebugLevel implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSSetFolderSyncConfig

func (k *SimpleFS) SimpleFSSetFolderSyncConfig(
	ctx context.Context, arg keybase1.SimpleFSSetFolderSyncConfigArg) error

SimpleFSSetFolderSyncConfig implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSSetNotificationThreshold

func (k *SimpleFS) SimpleFSSetNotificationThreshold(ctx context.Context, threshold int64) (err error)

SimpleFSSetNotificationThreshold implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSSetStat

func (k *SimpleFS) SimpleFSSetStat(ctx context.Context, arg keybase1.SimpleFSSetStatArg) (err error)

SimpleFSSetStat - Set/clear file bits - only executable for now

func (*SimpleFS) SimpleFSSettings

func (k *SimpleFS) SimpleFSSettings(ctx context.Context) (settings keybase1.FSSettings, err error)

SimpleFSSettings implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSStat

func (k *SimpleFS) SimpleFSStat(ctx context.Context, arg keybase1.SimpleFSStatArg) (de keybase1.Dirent, err error)

SimpleFSStat - Get info about file

func (*SimpleFS) SimpleFSSubscribeNonPath

func (k *SimpleFS) SimpleFSSubscribeNonPath(
	ctx context.Context, arg keybase1.SimpleFSSubscribeNonPathArg) error

SimpleFSSubscribeNonPath implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSSubscribePath

func (k *SimpleFS) SimpleFSSubscribePath(
	ctx context.Context, arg keybase1.SimpleFSSubscribePathArg) error

SimpleFSSubscribePath implements the SimpleFSInterface.

func (k *SimpleFS) SimpleFSSymlink(ctx context.Context, arg keybase1.SimpleFSSymlinkArg) (err error)

SimpleFSSymlink starts making a symlink of a file or directory

func (*SimpleFS) SimpleFSSyncConfigAndStatus

func (k *SimpleFS) SimpleFSSyncConfigAndStatus(
	ctx context.Context) (res keybase1.SyncConfigAndStatusRes, err error)

SimpleFSSyncConfigAndStatus implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSSyncStatus

func (k *SimpleFS) SimpleFSSyncStatus(ctx context.Context, filter keybase1.ListFilter) (keybase1.FSSyncStatus, error)

SimpleFSSyncStatus - Get sync status.

func (*SimpleFS) SimpleFSUnsubscribe

func (k *SimpleFS) SimpleFSUnsubscribe(
	ctx context.Context, sid string) error

SimpleFSUnsubscribe implements the SimpleFSInterface.

func (*SimpleFS) SimpleFSUserEditHistory

func (k *SimpleFS) SimpleFSUserEditHistory(ctx context.Context) (
	res []keybase1.FSFolderEditHistory, err error)

SimpleFSUserEditHistory returns the edit history for the logged-in user.

func (*SimpleFS) SimpleFSWait

func (k *SimpleFS) SimpleFSWait(ctx context.Context, opid keybase1.OpID) error

SimpleFSWait - Blocking wait for the pending operation to finish

func (*SimpleFS) SimpleFSWrite

func (k *SimpleFS) SimpleFSWrite(ctx context.Context, arg keybase1.SimpleFSWriteArg) error

SimpleFSWrite - Append content to opened file. May be repeated until OpID is closed.

func (*SimpleFS) TlfHandleChange

func (k *SimpleFS) TlfHandleChange(_ context.Context, _ *tlfhandle.Handle)

TlfHandleChange implements the libkbfs.Observer interface for SimpleFS.

Jump to

Keyboard shortcuts

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