Documentation ¶
Overview ¶
Package webdav provides WebDAV file sharing and synchronization.
Copyright (c) 2018 - 2024 PhotoPrism UG. All rights reserved.
This program is free software: you can redistribute it and/or modify it under Version 3 of the GNU Affero General Public License (the "AGPL"): <https://docs.photoprism.app/license/agpl> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. The AGPL is supplemented by our Trademark and Brand Guidelines, which describe how our Brand Assets may be used: <https://www.photoprism.app/trademark>
Feel free to send an email to hello@photoprism.app if you have questions, want to support our work, or just want to say hello.
Additional information can be found in our Developer Guide: <https://docs.photoprism.app/developer-guide/>
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Delete(dir string) error
- func (c *Client) Directories(dir string, recursive bool, timeout time.Duration) (result fs.FileInfos, err error)
- func (c *Client) Download(src, dest string, force bool) (err error)
- func (c *Client) DownloadDir(src, dest string, recursive, force bool) (errs []error)
- func (c *Client) Files(dir string, recursive bool) (result fs.FileInfos, err error)
- func (c *Client) Mkdir(dir string) error
- func (c *Client) MkdirAll(dir string) (err error)
- func (c *Client) Upload(src, dest string) (err error)
- type Timeout
Constants ¶
const MaxRequestDuration = 30 * time.Minute
MaxRequestDuration is the maximum request duration e.g. for recursive retrieval of large remote directory structures.
const Second = time.Second
Second represents a second on which other timeouts are based.
Variables ¶
var Durations = map[Timeout]time.Duration{ TimeoutHigh: 120 * Second, TimeoutDefault: 60 * Second, TimeoutMedium: 60 * Second, TimeoutLow: 30 * Second, TimeoutNone: 0, }
Durations maps Timeout options to specific time durations.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a webdav client.
func (*Client) Directories ¶
func (c *Client) Directories(dir string, recursive bool, timeout time.Duration) (result fs.FileInfos, err error)
Directories returns all subdirectories in a path as string slice.
func (*Client) DownloadDir ¶
DownloadDir downloads all files from a remote to a local directory.
func (*Client) Files ¶
Files returns information about files in a directory, optionally recursively.