Documentation ¶
Index ¶
- type File
- func (file *File) Close() error
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) ReadDir(n int) ([]fs.DirEntry, error)
- func (file *File) Readdir(count int) ([]fs.FileInfo, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Size() int64
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Write(p []byte) (n int, err error)
- type FileRESTAPI
- type RESTFileSystem
- func (restfilesystem *RESTFileSystem) Mkdir(ctx context.Context, name string, perm os.FileMode) error
- func (restfilesystem *RESTFileSystem) Open(name string) (fs.File, error)
- func (restfilesystem *RESTFileSystem) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
- func (restfilesystem *RESTFileSystem) ReadDir(name string) ([]fs.DirEntry, error)
- func (restfilesystem *RESTFileSystem) RemoveAll(ctx context.Context, name string) error
- func (restfilesystem *RESTFileSystem) Rename(ctx context.Context, oldName string, newName string) error
- func (restfilesystem *RESTFileSystem) Stat(ctx context.Context, name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileRESTAPI ¶
type FileRESTAPI interface { GetContent(ctx context.Context, name string) (io.ReadCloser, error) Stat(ctx context.Context, name string) (fs.FileInfo, error) GetChildren(ctx context.Context, name string) ([]fs.FileInfo, error) MkDir(ctx context.Context, name string, perm os.FileMode) error Update(ctx context.Context, name string, rc io.Reader) error NewFile(ctx context.Context, name string, rc io.Reader) error RemoveAll(ctx context.Context, name string) error Rename(ctx context.Context, oldname string, newname string) error }
type RESTFileSystem ¶
type RESTFileSystem struct {
API FileRESTAPI
}
A simple webdav.FileSystem implementation that simplifies working with REST interfaces
func (*RESTFileSystem) Mkdir ¶
func (restfilesystem *RESTFileSystem) Mkdir(ctx context.Context, name string, perm os.FileMode) error
Create a new directory
func (*RESTFileSystem) Open ¶
func (restfilesystem *RESTFileSystem) Open(name string) (fs.File, error)
Open implements fs.FS.
func (*RESTFileSystem) ReadDir ¶
func (restfilesystem *RESTFileSystem) ReadDir(name string) ([]fs.DirEntry, error)
ReadDir reads the named directory and returns a list of directory entries sorted by filename.
func (*RESTFileSystem) RemoveAll ¶
func (restfilesystem *RESTFileSystem) RemoveAll(ctx context.Context, name string) error
Click to show internal directories.
Click to hide internal directories.