Documentation ¶
Index ¶
- Variables
- func Clone(x fs.FS, dx fs.FS, y, dy string) error
- func Dotify(p string) string
- func FuseFS(r p9.Attachment) fusefs.FS
- func GetHackFlag(x experimentalsys.Oflag) int
- func GetSysFlag(x int) experimentalsys.Oflag
- func Ipfs(x fs.FS, y string) (files.Node, error)
- func L(l Lookup) hackpadfs.FS
- func Meld(i I, x, y string) (string, error)
- func Mount(j fs.FS, p string) (func() error, error)
- func MountIpfs(x I, i, p string) (func() error, error)
- func NewCow(over fs.FS, layer fs.FS) fs.FS
- func NewDir(i I, m map[string]string) (string, error)
- func Patch(i I, x string, f func(*mount.FS) error) (string, error)
- func ServeFuse(c *fuse.Conn, r p9.Attachment) error
- func WazAdapt(err error) experimentalsys.Errno
- func WithHackpadFS(x wazero.FSConfig, d string, fs hackpadfs.FS) wazero.FSConfig
- type A
- type AF
- func (b AF) Chmod(name string, mode os.FileMode) error
- func (b AF) Chown(name string, uid, gid int) error
- func (b AF) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (b AF) Create(filename string) (afero.File, error)
- func (b AF) Join(elem ...string) string
- func (b AF) Lstat(filename string) (os.FileInfo, error)
- func (b AF) Mkdir(filename string, perm os.FileMode) error
- func (b AF) MkdirAll(filename string, perm os.FileMode) error
- func (b AF) Name() string
- func (b AF) Open(filename string) (afero.File, error)
- func (b AF) OpenFile(filename string, flag int, perm os.FileMode) (afero.File, error)
- func (b AF) ReadDir(path string) ([]os.FileInfo, error)
- func (b AF) Readlink(link string) (string, error)
- func (b AF) Remove(filename string) error
- func (b AF) RemoveAll(filename string) error
- func (b AF) Rename(oldpath, newpath string) error
- func (b AF) Root() string
- func (b AF) Stat(filename string) (os.FileInfo, error)
- func (b AF) Symlink(target, link string) error
- func (b AF) TempFile(dir, prefix string) (billy.File, error)
- type B
- func (b B) Lock() error
- func (b B) Name() string
- func (b B) ReadAt(p []byte, off int64) (n int, err error)
- func (b B) Readdir(count int) ([]os.FileInfo, error)
- func (b B) Readdirnames(count int) ([]string, error)
- func (b B) Seek(offset int64, whence int) (int64, error)
- func (b B) Sync() error
- func (b B) Truncate(size int64) error
- func (b B) Unlock() error
- func (b B) Write(x []byte) (int, error)
- func (b B) WriteAt(p []byte, off int64) (n int, err error)
- func (b B) WriteString(s string) (ret int, err error)
- type BF
- func (b BF) Chroot(path string) (billy.Filesystem, error)
- func (b BF) Create(filename string) (billy.File, error)
- func (b BF) Join(elem ...string) string
- func (b BF) Lstat(filename string) (os.FileInfo, error)
- func (b BF) MkdirAll(filename string, perm os.FileMode) error
- func (b BF) Open(filename string) (billy.File, error)
- func (b BF) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)
- func (b BF) ReadDir(path string) ([]os.FileInfo, error)
- func (b BF) Readlink(link string) (string, error)
- func (b BF) Remove(filename string) error
- func (b BF) Rename(oldpath, newpath string) error
- func (b BF) Root() string
- func (b BF) Stat(filename string) (os.FileInfo, error)
- func (b BF) Symlink(target, link string) error
- func (b BF) TempFile(dir, prefix string) (billy.File, error)
- type Dav
- func (d Dav) Mkdir(ctx context.Context, name string, perm fs.FileMode) error
- func (d Dav) OpenFile(ctx context.Context, name string, flag int, perm fs.FileMode) (webdav.File, error)
- func (d Dav) RemoveAll(ctx context.Context, name string) error
- func (d Dav) Rename(ctx context.Context, oldName string, newName string) error
- func (d Dav) Stat(ctx context.Context, name string) (fs.FileInfo, error)
- type Dir
- func (d Dir) Attach(afile p9.File, user, aname string) (p9.Attachment, error)
- func (d Dir) Auth(user, aname string) (p9.File, error)
- func (d Dir) Create(p string, perm p9.FileMode, mode uint8) (p9.File, error)
- func (d Dir) Open(p string, mode uint8) (p9.File, error)
- func (d Dir) Remove(p string) error
- func (d Dir) Stat(p string) (p9.DirEntry, error)
- func (d Dir) WriteStat(p string, changes p9.StatChanges) error
- type F
- type FA
- type FB
- type FSF
- type FSP
- type FSS
- type FSW
- type I
- type IF
- type IN
- type Lookup
- type N
- type PathF
- type Pusher
- type Sftp
- type WackFS
- type WazFS
- func (WazFS) Chmod(path string, perm fs.FileMode) experimentalsys.Errno
- func (WazFS) Link(oldPath string, newPath string) experimentalsys.Errno
- func (w WazFS) Lstat(path string) (sys.Stat_t, experimentalsys.Errno)
- func (WazFS) Mkdir(path string, perm fs.FileMode) experimentalsys.Errno
- func (w *WazFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
- func (WazFS) Readlink(path string) (string, experimentalsys.Errno)
- func (WazFS) Rename(from string, to string) experimentalsys.Errno
- func (WazFS) Rmdir(path string) experimentalsys.Errno
- func (w WazFS) Stat(path string) (sys.Stat_t, experimentalsys.Errno)
- func (WazFS) Symlink(oldPath string, linkName string) experimentalsys.Errno
- func (WazFS) Unlink(path string) experimentalsys.Errno
- func (WazFS) Utimens(path string, atim int64, mtim int64) experimentalsys.Errno
- type WazFile
- func (w WazFile) Close() experimentalsys.Errno
- func (w WazFile) Datasync() experimentalsys.Errno
- func (w WazFile) Dev() (uint64, experimentalsys.Errno)
- func (WazFile) Ino() (uint64, experimentalsys.Errno)
- func (w WazFile) IsAppend() bool
- func (w WazFile) IsDir() (bool, experimentalsys.Errno)
- func (w WazFile) Pread(buf []byte, off int64) (n int, errno experimentalsys.Errno)
- func (w WazFile) Pwrite(buf []byte, off int64) (n int, errno experimentalsys.Errno)
- func (w WazFile) Read(buf []byte) (n int, errno experimentalsys.Errno)
- func (w WazFile) Readdir(n int) (dirents []experimentalsys.Dirent, errno experimentalsys.Errno)
- func (w *WazFile) Reopen() error
- func (w WazFile) Seek(offset int64, whence int) (newOffset int64, errno experimentalsys.Errno)
- func (w *WazFile) SetAppend(enable bool) experimentalsys.Errno
- func (w WazFile) Stat() (sys.Stat_t, experimentalsys.Errno)
- func (w WazFile) Sync() experimentalsys.Errno
- func (w WazFile) Truncate(size int64) experimentalsys.Errno
- func (WazFile) Utimens(atim int64, mtim int64) experimentalsys.Errno
- func (w WazFile) Write(buf []byte) (n int, errno experimentalsys.Errno)
Constants ¶
This section is empty.
Variables ¶
var WazFlags = map[experimentalsys.Oflag]int{ experimentalsys.O_APPEND: hackpadfs.FlagAppend, experimentalsys.O_CREAT: hackpadfs.FlagCreate, experimentalsys.O_RDONLY: hackpadfs.FlagReadOnly, experimentalsys.O_WRONLY: hackpadfs.FlagWriteOnly, experimentalsys.O_SYNC: hackpadfs.FlagSync, experimentalsys.O_TRUNC: hackpadfs.FlagTruncate, }
Functions ¶
func GetHackFlag ¶
func GetHackFlag(x experimentalsys.Oflag) int
func GetSysFlag ¶
func GetSysFlag(x int) experimentalsys.Oflag
func WazAdapt ¶
func WazAdapt(err error) experimentalsys.Errno
Types ¶
type AF ¶
func (AF) Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.
func (AF) Join ¶
Join joins any number of path elements into a single path, adding a Separator if necessary. Join calls filepath.Clean on the result; in particular, all empty strings are ignored. On Windows, the result is a UNC path if and only if the first path element is a UNC path.
func (AF) Lstat ¶
Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link.
func (AF) MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm are used for all directories that MkdirAll creates. If path is/ already a directory, MkdirAll does nothing and returns nil.
func (AF) Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.
func (AF) OpenFile ¶
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, methods on the returned File can be used for I/O.
func (AF) ReadDir ¶
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
func (AF) Rename ¶
Rename renames (moves) oldpath to newpath. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.
type BF ¶
func (BF) Chroot ¶
Chroot returns a new filesystem from the same type where the new root is the given path. Files outside of the designated directory tree cannot be accessed.
func (BF) Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.
func (BF) Join ¶
Join joins any number of path elements into a single path, adding a Separator if necessary. Join calls filepath.Clean on the result; in particular, all empty strings are ignored. On Windows, the result is a UNC path if and only if the first path element is a UNC path.
func (BF) Lstat ¶
Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link.
func (BF) MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm are used for all directories that MkdirAll creates. If path is/ already a directory, MkdirAll does nothing and returns nil.
func (BF) Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.
func (BF) OpenFile ¶
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, methods on the returned File can be used for I/O.
func (BF) ReadDir ¶
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
func (BF) Rename ¶
Rename renames (moves) oldpath to newpath. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.
type Dav ¶
func (Dav) OpenFile ¶
func (d Dav) OpenFile(ctx context.Context, name string, flag int, perm fs.FileMode) (webdav.File, error)
OpenFile implements webdav.FileSystem.
type Dir ¶
Dir is an implementation of FileSystem that serves from the local filesystem. It accepts attachments of either "" or "/", but rejects all others.
Note that Dir does not support authentication, simply returning an error for any attempt to do so. If authentication is necessary, wrap a Dir in an AuthFS instance.
type FA ¶
func NewAferoShim ¶
func (FA) Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.
func (FA) Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.
type FB ¶
type FB struct {
billy.Filesystem
}
func (FB) Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.
func (FB) Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.
type FSW ¶
type FSW struct {
p9.Attachment
}
type PathF ¶
type PathF struct { p9.Attachment Path string }
type WazFS ¶
func (WazFS) Link ¶
func (WazFS) Link(oldPath string, newPath string) experimentalsys.Errno
Link implements sys.FS.
func (*WazFS) OpenFile ¶
func (w *WazFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
OpenFile implements sys.FS.
func (WazFS) Readlink ¶
func (WazFS) Readlink(path string) (string, experimentalsys.Errno)
Readlink implements sys.FS.
func (WazFS) Rename ¶
func (WazFS) Rename(from string, to string) experimentalsys.Errno
Rename implements sys.FS.
func (WazFS) Symlink ¶
func (WazFS) Symlink(oldPath string, linkName string) experimentalsys.Errno
Symlink implements sys.FS.
type WazFile ¶
type WazFile struct { B B Flags experimentalsys.Oflag In struct { FS *WazFS Path string } }
func (WazFile) Datasync ¶
func (w WazFile) Datasync() experimentalsys.Errno
Datasync implements sys.File.
func (WazFile) Dev ¶
func (w WazFile) Dev() (uint64, experimentalsys.Errno)
Dev implements sys.File.
func (WazFile) IsDir ¶
func (w WazFile) IsDir() (bool, experimentalsys.Errno)
IsDir implements sys.File.
func (WazFile) Read ¶
func (w WazFile) Read(buf []byte) (n int, errno experimentalsys.Errno)
Read implements sys.File.
func (WazFile) Readdir ¶
func (w WazFile) Readdir(n int) (dirents []experimentalsys.Dirent, errno experimentalsys.Errno)
Readdir implements sys.File.
func (*WazFile) SetAppend ¶
func (w *WazFile) SetAppend(enable bool) experimentalsys.Errno
SetAppend implements sys.File.
func (WazFile) Stat ¶
func (w WazFile) Stat() (sys.Stat_t, experimentalsys.Errno)
Stat implements sys.File.
func (WazFile) Truncate ¶
func (w WazFile) Truncate(size int64) experimentalsys.Errno
Truncate implements sys.File.