Documentation ¶
Overview ¶
Package webdavfs provides an implementation of webdav.FileSystem backed by a gowebdav.Client.
Index ¶
Constants ¶
View Source
const ( // MaxRewindBuffer specifies the size of the rewind buffer for reading // from files. For some files, net/http performs content type detection // by reading up to the first 512 bytes of a file, then seeking back to the // beginning before actually transmitting the file. To support this, we // maintain a rewind buffer of 512 bytes. MaxRewindBuffer = 512 )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts Options) webdav.FileSystem
New creates a new webdav.FileSystem backed by the given gowebdav.Client. If cacheTTL is greater than zero, the filesystem will cache results from Stat calls for the given duration.
Types ¶
type Options ¶
type Options struct { // Logf us a logging function to use for debug and error logging. Logf logger.Logf // URL is the base URL of the remote WebDAV server. URL string // Transport is the http.Transport to use for connecting to the WebDAV // server. Transport http.RoundTripper // StatRoot, if true, will cause this filesystem to actually stat its own // root via the remote server. If false, it will use a static directory // info for the root to avoid a round-trip. StatRoot bool // StatCacheTTL, when greater than 0, enables caching of file metadata StatCacheTTL time.Duration // Clock, if specified, determines the current time. If not specified, we // default to time.Now(). Clock tstime.Clock }
Click to show internal directories.
Click to hide internal directories.