The tinydav_client Module

class cloudfusion.store.webdav.tinydav_client.TinyDAVClient(url, user, pwd)

Bases: object

A parital WebDAV client implementation based on tinydav, since cadaver v0.23.3 cannot handle the response of https://webdav.4shared.com, which sends properties without a namespace.

Create a WebDAV client connecting to the WebDAV server at url with the credentials username and a password. :param url: the WebDAV server url; i.e. https://webdav.4shared.com :param user: the username :param pwd: the password

_get_client()
_handle_error(error, stacktrace, method_name, remaining_tries, *args, **kwargs)
copy(*args, **kwargs)
Raises:NoSuchFilesytemObjectError if source does not exist
get_bulk_metadata(*args, **kwargs)
Returns:A dictionary mapping the path of every file object in directory to a dictionary with the keys ‘modified’, ‘bytes’ and ‘is_dir’ containing the corresponding metadata for the file object.

The value for ‘modified’ is a date in seconds, stating when the file object was last modified. The value for ‘bytes’ is the number of bytes of the file object. It is 0 if the object is a directory. The value for ‘is_dir’ is True if the file object is a directory and False otherwise.

Raises:NoSuchFilesytemObjectError if the directory does not exist
get_directory_listing(*args, **kwargs)
Raises:StoreAccessError if the directory cannot be listed
Raises:NoSuchFilesytemObjectError if path does not exist
get_file(*args, **kwargs)
get_metadata(*args, **kwargs)
Raises:StoreAccessError if propfind does not return getcontentlength or getlastmodified property
Raises:NoSuchFilesytemObjectError if path does not exist
get_overall_space(*args, **kwargs)
get_used_space(*args, **kwargs)
mkdir(*args, **kwargs)
Raises:StoreAccessError if the directory cannot be created
move(*args, **kwargs)
Raises:NoSuchFilesytemObjectError if source does not exist
rm(*args, **kwargs)
Raises:StoreAccessError if the file cannot be deleted
Raises:NoSuchFilesytemObjectError if path does not exist
rmdir(*args, **kwargs)
Raises:StoreAccessError if the directory cannot be deleted
Raises:NoSuchFilesytemObjectError if path does not exist
upload(*args, **kwargs)

Upload the file at local_file_path to the path remote_file_path at the remote server

The webdav_store Module

Created on 08.04.2011

@author: joe

class cloudfusion.store.webdav.webdav_store.WebdavStore(config)

Bases: cloudfusion.store.store.Store

config is a dictionary with the keys user, password, and URL. For instance:

#url can also contain an existing subfolder to access, i.e. https://webdav.mediencenter.t-online.de/myfolder
#url can also contain the port for the WebDAV server, i.e. https://webdav.mediencenter.t-online.de:443
config['url'] = 'https://webdav.mediencenter.t-online.de' 
config['user'] = 'me@emailserver.com' #your account username/e-mail address
config['password'] = 'MySecret!23$' #your account password
Parameters:config – dictionary with key value pairs
_WebdavStore__get_size(fileobject)
_get_time_difference()
_handle_error(error, stacktrace, method_name, remaining_tries, *args, **kwargs)
account_info()
create_directory(*args, **kwargs)
delete(*args, **kwargs)
duplicate(*args, **kwargs)
get_directory_listing(*args, **kwargs)
get_file(*args, **kwargs)
get_logging_handler()
get_max_filesize()

Return maximum number of bytes per file

get_metadata(*args, **kwargs)
get_name()
get_overall_space(*args, **kwargs)
get_used_space(*args, **kwargs)
move(*args, **kwargs)
store_fileobject(*args, **kwargs)

The cadaver_client Module

The bulk_get_metadata_webdav_store Module

class cloudfusion.store.webdav.bulk_get_metadata_webdav_store.BulkGetMetadataWebdavStore(config)

Bases: cloudfusion.store.webdav.webdav_store.WebdavStore, cloudfusion.store.bulk_get_metadata.BulkGetMetadata

Subclass of GoogleStore, extending it by implementing the BulkGetMetadata interface for quick directory lising.

get_bulk_metadata(*args, **kwargs)
Returns:A dictionary mapping the path of every file object in directory to a dictionary with the keys ‘modified’, ‘bytes’ and ‘is_dir’ containing the corresponding metadata for the file object.

The value for ‘modified’ is a date in seconds, stating when the file object was last modified. The value for ‘bytes’ is the number of bytes of the file object. It is 0 if the object is a directory. The value for ‘is_dir’ is True if the file object is a directory and False otherwise.

Raises:NoSuchFilesytemObjectError if the directory does not exist

Table Of Contents

Previous topic

The dropbox_store Module

Next topic

The bulk_get_metadata_google_store Module

This Page