filesystem

package
v0.0.0-...-723b4f1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir struct {
	FS *FS
}

Dir implements both Node and Handle for the root directory.

func (*Dir) Attr

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

func (*Dir) Lookup

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

func (*Dir) ReadDirAll

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

type FS

type FS struct {
	Files      map[string]*File
	DIREntries []fuse.Dirent
}

FS implements the ytfs file system.

func (*FS) Root

func (fs *FS) Root() (fs.Node, error)

type File

type File struct {
	Title         string
	Inode         uint64
	Size          uint64
	Data          []byte
	PlaylistEntry *youtube.PlaylistEntry
}

File implements both Node and Handle for the yt file.

func (*File) Attr

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

func (*File) CacheData

func (f *File) CacheData(ctx context.Context) error

func (*File) Read

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

func (*File) ReadAll

func (f *File) ReadAll(ctx context.Context) (data []byte, err error)

Jump to

Keyboard shortcuts

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