pfs

package
v0.0.0-...-59a5eb6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pfs implements the pCloud API as a fs.FS interface At the moment this is a prototype and should not be used by other packages! Because the API is not stable yet and the implementation is not complete.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS implements the fs.Fs interface for pCloud-files

func (*FS) Open

func (f *FS) Open(name string) (fs.File, error)

type File

type File struct {
	FileStat
	// contains filtered or unexported fields
}

File implements the fs.File interface for pCloud-files

func (File) Close

func (f File) Close() error

Close implements os.File

func (File) Info

func (f File) Info() (fs.FileInfo, error)

func (File) IsDir

func (f File) IsDir() bool

IsDir implements os.FileInfo

func (File) ModTime

func (f File) ModTime() time.Time

ModTime implements os.FileInfo

func (File) Mode

func (f File) Mode() fs.FileMode

Mode implements os.FileInfo

func (File) Name

func (f File) Name() string

Name implements os.FileInfo

func (File) Read

func (f File) Read(b []byte) (int, error)

Read implements os.File

func (File) ReadDir

func (f File) ReadDir(n int) ([]fs.DirEntry, error)

ReadDir implementation for fs.FS

func (File) Size

func (f File) Size() int64

Size implements os.FileInfo

func (File) Stat

func (f File) Stat() (os.FileInfo, error)

Stat implements os.File

func (File) Sys

func (f File) Sys() any

Sys implements os.FileInfo

func (File) Type

func (f File) Type() fs.FileMode

type FileStat

type FileStat struct {
	Created     time.Time `json:"created"`
	Modified    time.Time `json:"modified"`
	FileID      int64     `json:"fileid"`
	Path        string    `json:"path"`
	Name        string    `json:"name"`
	ContentType string    `json:"contenttype"`
	Size        int64     `json:"size"`
}

Jump to

Keyboard shortcuts

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