fsapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFileMode = os.FileMode(int(0777))

DefaultFileMode ...

Variables

This section is empty.

Functions

func ErrorFromStatus

func ErrorFromStatus(code int) fuse.Errno

ErrorFromStatus ...

func ParseTime

func ParseTime(n *html.Node) (t time.Time)

ParseTime ...

func SafeParseBool

func SafeParseBool(s string) bool

SafeParseBool ...

func SafeParseInt64

func SafeParseInt64(s string) int64

SafeParseInt64 ...

Types

type Client

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

Client ...

func NewClient

func NewClient(url string, tlsverify bool) *Client

NewClient ...

func (Client) Chmod

func (c Client) Chmod(path string, mode os.FileMode) error

Chmod ...

func (Client) Delete

func (c Client) Delete(path string) error

Delete ...

func (Client) Get

func (c Client) Get(path string) *http.Request

Get ...

func (Client) Head

func (c Client) Head(path string) *http.Request

Head ...

func (c Client) Link(path, name string) error

Link ...

func (Client) Mkdir

func (c Client) Mkdir(path string, perm os.FileMode) error

Mkdir ...

func (Client) NewRequest

func (c Client) NewRequest(method, path string, body io.Reader) *http.Request

NewRequest ...

func (Client) Put

func (c Client) Put(path string, body io.Reader) *http.Request

Put ...

func (Client) Readdir

func (c Client) Readdir(path string) ([]os.FileInfo, error)

Readdir ...

func (Client) Rename

func (c Client) Rename(oldpath, newpath string) error

Rename ...

func (Client) Stat

func (c Client) Stat(path string) (os.FileInfo, error)

Stat ...

func (c Client) Symlink(target, name string) error

Symlink ...

func (Client) Truncate

func (c Client) Truncate(path string, size uint64) error

Truncate ...

type Dir

type Dir struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Dir ...

func (*Dir) Attr

func (d *Dir) Attr(ctx context.Context, o *fuse.Attr) error

Attr ...

func (*Dir) Create

func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

Create ...

func (d *Dir) Link(ctx context.Context, req *fuse.LinkRequest, old fs.Node) (newNode fs.Node, err error)

Link ...

func (*Dir) Lookup

func (d *Dir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup ...

func (*Dir) Mkdir

func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

Mkdir ...

func (*Dir) ReadDirAll

func (d *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll ...

func (*Dir) Remove

func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error

Remove ...

func (*Dir) Rename

func (d *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error

Rename ...

func (d *Dir) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node, error)

Symlink ...

type File

type File struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

File ...

func (*File) Access

func (f *File) Access(ctx context.Context, req *fuse.AccessRequest) error

Access ...

func (*File) Attr

func (f *File) Attr(ctx context.Context, o *fuse.Attr) error

Attr ...

func (*File) Open

func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)

Open ...

func (*File) Read

func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error

func (*File) Release

func (f *File) Release(ctx context.Context, req *fuse.ReleaseRequest) error

Release ...

func (*File) Setattr

func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

Setattr ...

func (*File) Write

func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

type HTTPFS

type HTTPFS struct {
	NodeID uint64
	// contains filtered or unexported fields
}

HTTPFS ...

func NewHTTPFS

func NewHTTPFS(url string, tlsverify bool) *HTTPFS

NewHTTPFS ...

func (*HTTPFS) Root

func (m *HTTPFS) Root() (fs.Node, error)

Root ...

func (*HTTPFS) Statfs

func (m *HTTPFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, res *fuse.StatfsResponse) error

Statfs ...

type Handle

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

Handle ...

func (Handle) Close

func (h Handle) Close() error

Close ...

func (Handle) ReadAt

func (h Handle) ReadAt(buf []byte, offset int64) (int, error)

ReadAt ...

func (Handle) WriteAt

func (h Handle) WriteAt(buf []byte, flags int, offset int64) (int, error)

WriteAt ...

Jump to

Keyboard shortcuts

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