Documentation ¶
Index ¶
- Variables
- type WebDAV
- func (w *WebDAV) Mkdir(ctx context.Context, name string, perm os.FileMode) (err error)
- func (w *WebDAV) OpenFile(ctx context.Context, name string, flags int, perm os.FileMode) (file webdav.File, err error)
- func (w *WebDAV) RemoveAll(ctx context.Context, name string) (err error)
- func (w *WebDAV) Rename(ctx context.Context, oldName, newName string) (err error)
- func (w *WebDAV) Stat(ctx context.Context, name string) (fi os.FileInfo, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "webdav remote:path", Short: `Serve remote:path over webdav.`, Long: ` rclone serve webdav implements a basic webdav server to serve the remote over HTTP via the webdav protocol. This can be viewed with a webdav client or you can make a remote of type webdav to read and write it. NB at the moment each directory listing reads the start of each file which is undesirable: see https://github.com/golang/go/issues/22577 ` + vfs.Help, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) cmd.Run(false, false, command, func() error { return serveWebDav(fsrc) }) }, }
Command definition for cobra
Functions ¶
This section is empty.
Types ¶
type WebDAV ¶
type WebDAV struct {
// contains filtered or unexported fields
}
WebDAV is a webdav.FileSystem interface
A FileSystem implements access to a collection of named files. The elements in a file path are separated by slash ('/', U+002F) characters, regardless of host operating system convention.
Each method has the same semantics as the os package's function of the same name.
Note that the os.Rename documentation says that "OS-specific restrictions might apply". In particular, whether or not renaming a file or directory overwriting another existing file or directory is an error is OS-dependent.
func (*WebDAV) OpenFile ¶
func (w *WebDAV) OpenFile(ctx context.Context, name string, flags int, perm os.FileMode) (file webdav.File, err error)
OpenFile opens a file or a directory
Click to show internal directories.
Click to hide internal directories.