Struct hyperdav::Client [−][src]
pub struct Client { /* fields omitted */ }
The WebDAV client. Make a Client
for each server.
Methods
impl Client
[src]
impl Client
pub fn new() -> ClientBuilder
[src]
pub fn new() -> ClientBuilder
Constructs a new ClientBuilder
.
pub fn get<I>(&self, path: I) -> Result<Response, FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
[src]
pub fn get<I>(&self, path: I) -> Result<Response, FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
Get a file from the WebDAV server.
Errors
This method fails if the passed path doesn't exist on the WebDAV server.
pub fn put<R, I>(&self, body: R, path: I) -> Result<(), FailureError> where
R: Read + Send + 'static,
I: IntoIterator,
I::Item: AsRef<str>,
[src]
pub fn put<R, I>(&self, body: R, path: I) -> Result<(), FailureError> where
R: Read + Send + 'static,
I: IntoIterator,
I::Item: AsRef<str>,
Put a file on the WebDAV server, make sure the URL is pointing to the location where you want the file to be.
Errors
This method fails if the passed path doesn't exist on the WebDAV server.
pub fn mkcol<I>(&self, path: I) -> Result<(), FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
[src]
pub fn mkcol<I>(&self, path: I) -> Result<(), FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
Creates a directory on the WebDAV server.
Errors
This methods fails if the path where you want to create the directory doesn't exist.
pub fn mv<F, T>(&self, from: F, to: T) -> Result<(), FailureError> where
F: IntoIterator,
F::Item: AsRef<str>,
T: IntoIterator,
T::Item: AsRef<str>,
[src]
pub fn mv<F, T>(&self, from: F, to: T) -> Result<(), FailureError> where
F: IntoIterator,
F::Item: AsRef<str>,
T: IntoIterator,
T::Item: AsRef<str>,
Rename or move a directory or file on the WebDAV server.
Errors
This method fails if from doesn't exist, also fails if the to path is invalid.
pub fn list<I>(&self, path: I) -> Result<Vec<PropfindResponse>, FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
[src]
pub fn list<I>(&self, path: I) -> Result<Vec<PropfindResponse>, FailureError> where
I: IntoIterator,
I::Item: AsRef<str>,
List files in a directory on the WebDAV server.
Errors
This method fails if the passed path doesn't exist on the WebDAV server.
pub fn request<I>(&self, method: Method, path: I) -> RequestBuilder where
I: IntoIterator,
I::Item: AsRef<str>,
[src]
pub fn request<I>(&self, method: Method, path: I) -> RequestBuilder where
I: IntoIterator,
I::Item: AsRef<str>,
Prepare a RequestBuilder
for use in a request to the WebDAV server.
This can be used in case you need to customize something or want to do something which is
still unsupported.