fsmount

package
v3.2.246 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package fsmount provides functionality to mount a Files.com file system using FUSE.

Index

Constants

View Source
const (
	// DefaultWriteConcurrency is the default number of concurrent file parts to upload.
	DefaultWriteConcurrency = 50

	// DefaultCacheTTL is the default cache TTL for the file system metadata.
	DefaultCacheTTL = 5 * time.Second

	// DefaultVolumeName is the default volume name for the file system.
	DefaultVolumeName = "Files.com"

	// DefaultDebugFuseLog is the default path to the fuse debug log. [Windows only]
	DefaultDebugFuseLog = "fuse.log"
)
View Source
const (
	// O_EVTONLY is a flag used to indicate that the file is opened for event notifications only.
	O_EVTONLY = 0x8000
)

Variables

View Source
var (
	ErrFileHandleInUse = fmt.Errorf("file handle ID already in use")
)

Functions

This section is empty.

Types

type FSWriter

type FSWriter interface {
	// contains filtered or unexported methods
}

type Filescomfs added in v3.2.197

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

Filescomfs is a file system that implements the fuse.FileSystem interface, allowing it to be mounted using FUSE. It provides a virtual files ystem interface to Files.com, allowing users to interact with their Files.com account as if it were a local file system.

func (*Filescomfs) Access added in v3.2.197

func (fs *Filescomfs) Access(path string, mask uint32) (errc int)

Access checks file access permissions.

func (*Filescomfs) Chflags added in v3.2.197

func (fs *Filescomfs) Chflags(path string, flags uint32) (errc int)

Chflags changes the BSD file flags (Windows file attributes).

func (*Filescomfs) Chmod added in v3.2.197

func (fs *Filescomfs) Chmod(path string, mode uint32) (errc int)

func (*Filescomfs) Chown added in v3.2.197

func (fs *Filescomfs) Chown(path string, uid uint32, gid uint32) (errc int)

Chown changes the owner and group of a file.

func (*Filescomfs) Create added in v3.2.197

func (fs *Filescomfs) Create(path string, flags int, mode uint32) (errc int, fh uint64)

func (*Filescomfs) CreateEx added in v3.2.197

func (fs *Filescomfs) CreateEx(path string, mode uint32, fi *fuse.FileInfo_t) (errc int)

CreateEx is similar to Create except that it allows direct manipulation of the FileInfo_t struct.

func (*Filescomfs) Destroy added in v3.2.197

func (fs *Filescomfs) Destroy()

func (*Filescomfs) Flush added in v3.2.197

func (fs *Filescomfs) Flush(path string, fh uint64) (errc int)

Flush flushes cached file data.

func (*Filescomfs) Fsync added in v3.2.197

func (fs *Filescomfs) Fsync(path string, datasync bool, fh uint64) (errc int)

func (*Filescomfs) Fsyncdir added in v3.2.197

func (fs *Filescomfs) Fsyncdir(path string, datasync bool, fh uint64) (errc int)

Fsyncdir synchronizes directory contents.

func (*Filescomfs) Getattr added in v3.2.197

func (fs *Filescomfs) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc int)

func (*Filescomfs) Getpath added in v3.2.197

func (fs *Filescomfs) Getpath(path string, fh uint64) (errc int, result string)

Getpath allows a case-insensitive file system to report the correct case of a file path.

func (*Filescomfs) Getxattr added in v3.2.197

func (fs *Filescomfs) Getxattr(path string, name string) (errc int, value []byte)

Getxattr gets extended attributes.

func (*Filescomfs) Init added in v3.2.197

func (fs *Filescomfs) Init()

Init initializes the Filescomfs file system.

func (fs *Filescomfs) Link(oldpath string, newpath string) (errc int)

Link creates a hard link to a file.

func (*Filescomfs) Listxattr added in v3.2.197

func (fs *Filescomfs) Listxattr(path string, fill func(name string) bool) (errc int)

Listxattr lists extended attributes.

func (*Filescomfs) Mkdir added in v3.2.197

func (fs *Filescomfs) Mkdir(path string, mode uint32) (errc int)

func (*Filescomfs) Mknod added in v3.2.197

func (fs *Filescomfs) Mknod(path string, mode uint32, dev uint64) (errc int)

Mknod creates a file node.

func (*Filescomfs) Open added in v3.2.197

func (fs *Filescomfs) Open(path string, flags int) (errc int, fh uint64)

func (*Filescomfs) OpenEx added in v3.2.197

func (fs *Filescomfs) OpenEx(path string, fi *fuse.FileInfo_t) (errc int)

OpenEx is similar to Open except that it allows direct manipulation of the FileInfo_t struct.

func (*Filescomfs) Opendir added in v3.2.197

func (fs *Filescomfs) Opendir(path string) (errc int, fh uint64)

func (*Filescomfs) Read added in v3.2.197

func (fs *Filescomfs) Read(path string, buff []byte, ofst int64, fh uint64) (n int)

func (*Filescomfs) Readdir added in v3.2.197

func (fs *Filescomfs) Readdir(path string,
	fill func(name string, stat *fuse.Stat_t, ofst int64) bool,
	ofst int64,
	fh uint64) (errc int)
func (fs *Filescomfs) Readlink(path string) (errc int, target string)

Readlink reads the target of a symbolic link.

func (*Filescomfs) Release added in v3.2.197

func (fs *Filescomfs) Release(path string, fh uint64) (errc int)

func (*Filescomfs) Releasedir added in v3.2.197

func (fs *Filescomfs) Releasedir(path string, fh uint64) (errc int)

func (*Filescomfs) Removexattr added in v3.2.197

func (fs *Filescomfs) Removexattr(path string, name string) (errc int)

Removexattr removes extended attributes.

func (*Filescomfs) Rename added in v3.2.197

func (fs *Filescomfs) Rename(oldpath string, newpath string) (errc int)

func (*Filescomfs) Rmdir added in v3.2.197

func (fs *Filescomfs) Rmdir(path string) int

func (*Filescomfs) Setchgtime added in v3.2.197

func (fs *Filescomfs) Setchgtime(path string, tmsp fuse.Timespec) (errc int)

Setchgtime changes the file change (ctime) time.

func (*Filescomfs) Setcrtime added in v3.2.197

func (fs *Filescomfs) Setcrtime(path string, tmsp fuse.Timespec) (errc int)

Setcrtime changes the file creation (birth) time.

func (*Filescomfs) Setxattr added in v3.2.197

func (fs *Filescomfs) Setxattr(path string, name string, value []byte, flags int) (errc int)

Setxattr sets extended attributes.

func (*Filescomfs) Statfs added in v3.2.197

func (fs *Filescomfs) Statfs(path string, stat *fuse.Statfs_t) (errc int)
func (fs *Filescomfs) Symlink(target string, newpath string) (errc int)

Symlink creates a symbolic link.

func (*Filescomfs) Truncate added in v3.2.197

func (fs *Filescomfs) Truncate(path string, size int64, fh uint64) (errc int)
func (fs *Filescomfs) Unlink(path string) (errc int)

func (*Filescomfs) Utimens added in v3.2.197

func (fs *Filescomfs) Utimens(path string, tmsp []fuse.Timespec) (errc int)

func (*Filescomfs) Validate added in v3.2.197

func (fs *Filescomfs) Validate() error

Validate checks if the Filescomfs file system is valid by attempting to list the root directories of the RemoteFs and LocalFs.

func (*Filescomfs) Write added in v3.2.197

func (fs *Filescomfs) Write(path string, buff []byte, ofst int64, fh uint64) (n int)

type FuseFlags added in v3.2.220

type FuseFlags int

func NewFuseFlags added in v3.2.220

func NewFuseFlags(flags int) FuseFlags

NewFuseFlags initializes a FuseFlags instance with the given integer flag value.

func (FuseFlags) IsAppend added in v3.2.220

func (f FuseFlags) IsAppend() bool

IsAppend checks if the flag is set to append.

func (FuseFlags) IsCreate added in v3.2.220

func (f FuseFlags) IsCreate() bool

IsCreate checks if the flag is set to create.

func (FuseFlags) IsCreateExclusive added in v3.2.220

func (f FuseFlags) IsCreateExclusive() bool

func (FuseFlags) IsEventOnly added in v3.2.220

func (f FuseFlags) IsEventOnly() bool

IsEventOnly checks if the flag is open for event notifications only.

func (FuseFlags) IsExclusive added in v3.2.220

func (f FuseFlags) IsExclusive() bool

IsExclusive checks if the flag is set to exclusive.

func (FuseFlags) IsReadOnly added in v3.2.220

func (f FuseFlags) IsReadOnly() bool

IsReadOnly checks if the flag is set to read-only.

func (FuseFlags) IsReadWrite added in v3.2.220

func (f FuseFlags) IsReadWrite() bool

IsReadWrite checks if the flag is set to read-write.

func (FuseFlags) IsTruncate added in v3.2.220

func (f FuseFlags) IsTruncate() bool

IsTruncate checks if the flag is set to truncate.

func (FuseFlags) IsWriteOnly added in v3.2.220

func (f FuseFlags) IsWriteOnly() bool

IsWriteOnly checks if the flag is set to write-only.

func (FuseFlags) String added in v3.2.220

func (f FuseFlags) String() string

String returns a string representation of the FuseFlags.

func (FuseFlags) Without added in v3.2.235

func (f FuseFlags) Without(remove int) FuseFlags

type Host added in v3.2.240

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

Host acts as a wrapper around a fuse.FileSystemHost and an fsmount.Filescomfs to allow interception unmount, and notify calls. This is primarily to facilitate calling Unmount on macOS because the unmount action on macOS does not reliably propagate to the underlying file system implementations, which means they don't reliably have the opportunity to clean up resources.

func Mount added in v3.2.197

func Mount(params MountParams) (*Host, error)

Mount initializes a Files.com file system and mounts it using FUSE.

func (*Host) Notify added in v3.2.240

func (h *Host) Notify(path string, action uint32) bool

Notify sends a notification to the FUSE host about changes to a specific path. This can be used to inform the FUSE layer that a file or directory has changed, prompting it to refresh its cache or take other appropriate actions.

func (*Host) Unmount added in v3.2.240

func (h *Host) Unmount() bool

Unmount unmounts the file system and cleans up resources.

type LocalFs added in v3.2.235

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

LocalFs is a used as a passthrough files system to the host operating system's file system for the local mount point. It is used for files that are considered temporary or that should not be uploaded to Files.com. In order to support programs that use the type of files that are not intended to be uploaded to Files.com, the Filescomfs can delegate those operations to this implementation.

func (*LocalFs) Access added in v3.2.235

func (fs *LocalFs) Access(path string, mask uint32) int

Access checks file access permissions. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Chflags added in v3.2.235

func (fs *LocalFs) Chflags(path string, flags uint32) int

Chflags is part of the FileSystemChflags interface and changes the BSD file flags (Windows file attributes).

func (*LocalFs) Chmod added in v3.2.235

func (fs *LocalFs) Chmod(path string, mode uint32) int

Chmod changes the permission bits of a file.

func (*LocalFs) Chown added in v3.2.235

func (fs *LocalFs) Chown(path string, uid uint32, gid uint32) int

Chown changes the owner and group of a file. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Create added in v3.2.235

func (fs *LocalFs) Create(path string, flags int, mode uint32) (errc int, fh uint64)

func (*LocalFs) CreateEx added in v3.2.235

func (fs *LocalFs) CreateEx(path string, mode uint32, fi *fuse.FileInfo_t) int

OpenEx and CreateEx are similar to Open and Create except that they allow direct manipulation of the FileInfo_t struct (which is analogous to the FUSE struct fuse_file_info). If implemented, they are preferred over Open and Create.

func (*LocalFs) Destroy added in v3.2.235

func (fs *LocalFs) Destroy()

func (*LocalFs) Flush added in v3.2.235

func (fs *LocalFs) Flush(path string, fh uint64) int

Flush flushes cached file data. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Fsync added in v3.2.235

func (fs *LocalFs) Fsync(path string, datasync bool, fh uint64) (errc int)

Fsync attempts to synchronize file contents.

func (*LocalFs) Fsyncdir added in v3.2.235

func (fs *LocalFs) Fsyncdir(path string, datasync bool, fh uint64) int

Fsyncdir synchronizes directory contents. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Getattr added in v3.2.235

func (fs *LocalFs) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc int)

func (*LocalFs) Getpath added in v3.2.235

func (fs *LocalFs) Getpath(path string, fh uint64) (int, string)

Getpath is part of the FileSystemGetpath interface and allows a case-insensitive file system to report the correct case of a file path.

func (*LocalFs) Getxattr added in v3.2.235

func (fs *LocalFs) Getxattr(path string, name string) (int, []byte)

Getxattr gets extended attributes. Any return value other than -fuse.ENOSYS indicates support for extended attributes, but also expects Setxattr, Listxattr, and Removexattr to exist for extended attribute support.

func (*LocalFs) Init added in v3.2.235

func (fs *LocalFs) Init()
func (fs *LocalFs) Link(oldpath string, newpath string) int

Link creates a hard link to a file. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Listxattr added in v3.2.235

func (fs *LocalFs) Listxattr(path string, fill func(name string) bool) int

Listxattr lists extended attributes.

func (*LocalFs) Mkdir added in v3.2.235

func (fs *LocalFs) Mkdir(path string, mode uint32) (errc int)

func (*LocalFs) Mknod added in v3.2.235

func (fs *LocalFs) Mknod(path string, mode uint32, dev uint64) int

Mknod creates a file node. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Open added in v3.2.235

func (fs *LocalFs) Open(path string, flags int) (errc int, fh uint64)

func (*LocalFs) OpenEx added in v3.2.235

func (fs *LocalFs) OpenEx(path string, fi *fuse.FileInfo_t) int

func (*LocalFs) Opendir added in v3.2.235

func (fs *LocalFs) Opendir(path string) (errc int, fh uint64)

func (*LocalFs) Read added in v3.2.235

func (fs *LocalFs) Read(path string, buff []byte, ofst int64, fh uint64) (n int)

func (*LocalFs) Readdir added in v3.2.235

func (fs *LocalFs) Readdir(path string,
	fill func(name string, stat *fuse.Stat_t, ofst int64) bool,
	ofst int64,
	fh uint64) (errc int)
func (fs *LocalFs) Readlink(path string) (int, string)

Readlink reads the target of a symbolic link. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Release added in v3.2.235

func (fs *LocalFs) Release(path string, fh uint64) (errc int)

func (*LocalFs) Releasedir added in v3.2.235

func (fs *LocalFs) Releasedir(path string, fh uint64) (errc int)

func (*LocalFs) Removexattr added in v3.2.235

func (fs *LocalFs) Removexattr(path string, name string) int

Removexattr removes extended attributes.

func (*LocalFs) Rename added in v3.2.235

func (fs *LocalFs) Rename(oldpath string, newpath string) (errc int)

func (*LocalFs) Rmdir added in v3.2.235

func (fs *LocalFs) Rmdir(path string) (errc int)

func (*LocalFs) Setchgtime added in v3.2.235

func (fs *LocalFs) Setchgtime(path string, tmsp fuse.Timespec) int

Setchgtime is part of the FileSystemSetchgtime interface and changes the file change (ctime) time.

func (*LocalFs) Setcrtime added in v3.2.235

func (fs *LocalFs) Setcrtime(path string, tmsp fuse.Timespec) int

Setcrtime is part of the FileSystemSetcrtime interface and changes the file creation (birth) time.

func (*LocalFs) Setxattr added in v3.2.235

func (fs *LocalFs) Setxattr(path string, name string, value []byte, flags int) int

Setxattr sets extended attributes.

func (fs *LocalFs) Symlink(target string, newpath string) int

Symlink creates a symbolic link. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*LocalFs) Truncate added in v3.2.235

func (fs *LocalFs) Truncate(path string, size int64, fh uint64) (errc int)
func (fs *LocalFs) Unlink(path string) (errc int)

func (*LocalFs) Utimens added in v3.2.235

func (fs *LocalFs) Utimens(path string, tmsp []fuse.Timespec) (errc int)

func (*LocalFs) Validate added in v3.2.235

func (fs *LocalFs) Validate() error

func (*LocalFs) Write added in v3.2.235

func (fs *LocalFs) Write(path string, buff []byte, ofst int64, fh uint64) (n int)

type MountParams added in v3.2.197

type MountParams struct {
	// Required. Files.com API configuration.
	Config *files_sdk.Config

	// Path to mount the file system.
	//
	// Optional on Windows. If provided, this is expected to be a drive letter
	// followed by a colon (e.g. "Z:"). If not specified, the letter closest to
	// the end of the Latin alphabet that is not already in use will be chosen.
	//
	// Required on MacOS and Linux, this is the path to the directory where mount points
	// will be located (e.g. "/mnt/files").
	MountPoint string

	// Optional. Path to a temporary directory for storing files that don't belong on Files.com.
	// e.g. .DS_Store, Thumbs.db, etc... The full list of patterns is available in the ignore package
	// https://github.com/Files-com/files-sdk-go/tree/master/ignore/data
	//
	// Defaults to OS-specific temporary directory if not specified.
	TmpFsPath string

	// Optional. Volume name to display in Finder/Explorer. On Windows, this is also used as the
	// share name for the UNC path. Defaults to "Files.com".
	VolumeName string

	// Optional. Files.com path to mount as the root of the file system. Defaults to the site root.
	Root string

	// Optional. Number of concurrent file parts to upload. Defaults to 50.
	WriteConcurrency int

	// Optional. Cache TTL for the file system metadata. Defaults to 5 seconds.
	CacheTTL time.Duration

	// Optional. Disable use of Files.com locks when writing files. Defaults to false.
	DisableLocking bool

	// Optional. List of patterns to ignore when creating files and directories. Defaults to
	// OS-specific defaults. To ignore no patterns, pass an empty slice.
	IgnorePatterns []string

	// Optional. If set to true, will initialize fuse configured to provide extra debug information.
	// Defaults to false.
	DebugFuse bool

	// Optional. The path to the fuse debug log. Only used if DebugFuse is set to true.
	// Defaults to fuse.log [Windows only]
	DebugFuseLog string

	// Optional. The path to the icon to display in Finder. If not specified, the default icon
	// for a network drive is used. [MacOS only]
	IconPath string
}

MountParams contains the parameters for mounting a Files.com file system using FUSE.

type OpenHandles added in v3.2.220

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

OpenHandles tracks currently-open FUSE file handles and allocates fresh IDs.

func NewOpenHandles added in v3.2.220

func NewOpenHandles(logger lib.LeveledLogger) *OpenHandles

NewOpenHandles initializes a new OpenHandles instance.

func (*OpenHandles) Close added in v3.2.235

func (h *OpenHandles) Close()

func (*OpenHandles) ExtendOpenHandleTtls added in v3.2.220

func (h *OpenHandles) ExtendOpenHandleTtls()

ExtendOpenHandleTtls extends the TTL of all open handles. This is useful to keep the file handles alive while the OS is still using them.

func (*OpenHandles) Lookup added in v3.2.220

func (h *OpenHandles) Lookup(id uint64) (*fileHandle, *fsNode, bool)

Lookup finds a fileHandle and node without holding the lock during use.

func (*OpenHandles) Open added in v3.2.220

func (h *OpenHandles) Open(node *fsNode, flags FuseFlags) (id uint64, fh *fileHandle)

Open creates a new ID and stores the handle. Never hold h.mu while allocating the ID to avoid lock-order issues.

func (*OpenHandles) OpenHandles added in v3.2.220

func (h *OpenHandles) OpenHandles() []*fileHandle

OpenHandles returns a slice of open file handles, excluding the root handle.

func (*OpenHandles) OpenWithFile added in v3.2.235

func (h *OpenHandles) OpenWithFile(node *fsNode, flags FuseFlags, file *os.File) (id uint64, fh *fileHandle)

OpenWithFile uses the given *os.File to create and store a new handle. Never hold h.mu while allocating the ID to avoid lock-order issues.

func (*OpenHandles) Release added in v3.2.220

func (h *OpenHandles) Release(id uint64) (*fileHandle, bool)

Release removes a fileHandle by id. Safe to call even if the handle was already closed.

type RemoteFs added in v3.2.235

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

RemoteFs is a file system that implements the logic for interacting with the Files.com API for a mounted file system. It handles all operations that are not handled by the LocalFs implementation, which is used for temporary files and files that should not be uploaded to Files.com. The Filescomfs implementation delegates operations to this implementation for all files who's source/destination is Files.com.

func (*RemoteFs) Access added in v3.2.235

func (fs *RemoteFs) Access(path string, mask uint32) int

Access checks file access permissions. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Chflags added in v3.2.235

func (fs *RemoteFs) Chflags(path string, flags uint32) int

Chflags is part of the FileSystemChflags interface and changes the BSD file flags (Windows file attributes).

func (*RemoteFs) Chmod added in v3.2.235

func (fs *RemoteFs) Chmod(path string, mode uint32) int

Chmod changes the permission bits of a file. Files.com does not support POSIX permissions, but certain operations may fail if calling Chmod returns an error, so this implementation is a no-op that returns success.

func (*RemoteFs) Chown added in v3.2.235

func (fs *RemoteFs) Chown(path string, uid uint32, gid uint32) int

Chown changes the owner and group of a file. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Create added in v3.2.235

func (fs *RemoteFs) Create(path string, flags int, mode uint32) (errc int, fh uint64)

func (*RemoteFs) CreateEx added in v3.2.235

func (fs *RemoteFs) CreateEx(path string, mode uint32, fi *fuse.FileInfo_t) int

OpenEx and CreateEx are similar to Open and Create except that they allow direct manipulation of the FileInfo_t struct (which is analogous to the FUSE struct fuse_file_info). If implemented, they are preferred over Open and Create.

func (*RemoteFs) Destroy added in v3.2.235

func (fs *RemoteFs) Destroy()

func (*RemoteFs) Flush added in v3.2.235

func (fs *RemoteFs) Flush(path string, fh uint64) int

Flush flushes cached file data. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Fsync added in v3.2.235

func (fs *RemoteFs) Fsync(path string, datasync bool, fh uint64) (errc int)

Fsync attempts to synchronize file contents. If an upload is active but the writer is already closed (finalizing in background), wait for completion. Otherwise, fall back to ENOSYS.

func (*RemoteFs) Fsyncdir added in v3.2.235

func (fs *RemoteFs) Fsyncdir(path string, datasync bool, fh uint64) int

Fsyncdir synchronizes directory contents. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Getattr added in v3.2.235

func (fs *RemoteFs) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc int)

func (*RemoteFs) Getpath added in v3.2.235

func (fs *RemoteFs) Getpath(path string, fh uint64) (int, string)

Getpath is part of the FileSystemGetpath interface and allows a case-insensitive file system to report the correct case of a file path.

func (*RemoteFs) Getxattr added in v3.2.235

func (fs *RemoteFs) Getxattr(path string, name string) (int, []byte)

Getxattr gets extended attributes. Any return value other than -fuse.ENOSYS indicates support for extended attributes, but also expects Setxattr, Listxattr, and Removexattr to exist for extended attribute support.

func (*RemoteFs) Init added in v3.2.235

func (fs *RemoteFs) Init()
func (fs *RemoteFs) Link(oldpath string, newpath string) int

Link creates a hard link to a file. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Listxattr added in v3.2.235

func (fs *RemoteFs) Listxattr(path string, fill func(name string) bool) int

Listxattr lists extended attributes.

func (*RemoteFs) Mkdir added in v3.2.235

func (fs *RemoteFs) Mkdir(path string, mode uint32) (errc int)

func (*RemoteFs) Mknod added in v3.2.235

func (fs *RemoteFs) Mknod(path string, mode uint32, dev uint64) int

Mknod creates a file node. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Open added in v3.2.235

func (fs *RemoteFs) Open(path string, flags int) (errc int, fh uint64)

func (*RemoteFs) OpenEx added in v3.2.235

func (fs *RemoteFs) OpenEx(path string, fi *fuse.FileInfo_t) int

func (*RemoteFs) Opendir added in v3.2.235

func (fs *RemoteFs) Opendir(path string) (errc int, fh uint64)

func (*RemoteFs) Read added in v3.2.235

func (fs *RemoteFs) Read(path string, buff []byte, ofst int64, fh uint64) (n int)

func (*RemoteFs) Readdir added in v3.2.235

func (fs *RemoteFs) Readdir(path string,
	fill func(name string, stat *fuse.Stat_t, ofst int64) bool,
	ofst int64,
	fh uint64) (errc int)
func (fs *RemoteFs) Readlink(path string) (int, string)

Readlink reads the target of a symbolic link. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Release added in v3.2.235

func (fs *RemoteFs) Release(path string, fh uint64) (errc int)

func (*RemoteFs) Releasedir added in v3.2.235

func (fs *RemoteFs) Releasedir(path string, fh uint64) (errc int)

func (*RemoteFs) Removexattr added in v3.2.235

func (fs *RemoteFs) Removexattr(path string, name string) int

Removexattr removes extended attributes.

func (*RemoteFs) Rename added in v3.2.235

func (fs *RemoteFs) Rename(oldpath string, newpath string) (errc int)

func (*RemoteFs) Rmdir added in v3.2.235

func (fs *RemoteFs) Rmdir(path string) int

func (*RemoteFs) Setchgtime added in v3.2.235

func (fs *RemoteFs) Setchgtime(path string, tmsp fuse.Timespec) int

Setchgtime is part of the FileSystemSetchgtime interface and changes the file change (ctime) time.

func (*RemoteFs) Setcrtime added in v3.2.235

func (fs *RemoteFs) Setcrtime(path string, tmsp fuse.Timespec) int

Setcrtime is part of the FileSystemSetcrtime interface and changes the file creation (birth) time.

func (*RemoteFs) Setxattr added in v3.2.235

func (fs *RemoteFs) Setxattr(path string, name string, value []byte, flags int) int

Setxattr sets extended attributes.

func (fs *RemoteFs) Symlink(target string, newpath string) int

Symlink creates a symbolic link. The return value of -fuse.ENOSYS indicates the method is not supported.

func (*RemoteFs) Truncate added in v3.2.235

func (fs *RemoteFs) Truncate(path string, size int64, fh uint64) (errc int)
func (fs *RemoteFs) Unlink(path string) (errc int)

func (*RemoteFs) Utimens added in v3.2.235

func (fs *RemoteFs) Utimens(path string, tmsp []fuse.Timespec) (errc int)

func (*RemoteFs) Validate added in v3.2.235

func (fs *RemoteFs) Validate() error

func (*RemoteFs) Write added in v3.2.235

func (fs *RemoteFs) Write(path string, buff []byte, ofst int64, fh uint64) (n int)

Jump to

Keyboard shortcuts

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