indra::ipc::webdav::WebDAV Class Reference

List of all members.

Public Member Functions

def __init__
def log
def connect
def request
def retry_request
def propfind
def purge
def get_file_size
def file_exists
def mkdir
def delete
def list_directory
def __put__
def put_string
def put_file
def create_empty_file
def get_file
def get_file_as_string
def get_post_as_string
def rename
def xrename
def copy
def xcopy

Public Attributes

 init_url
 init_proxy
 retries_before_fail
 top_path
 host_header
 host
 port
 connection

Private Member Functions

def __err
def __tmp_filename
def __get_file_setup
def __get_file_read
def __destination_command


Detailed Description

WebDAV docstring 

Definition at line 74 of file webdav.py.


Member Function Documentation

def indra::ipc::webdav::WebDAV::__init__ (   self,
  url,
  proxy = None,
  retries_before_fail = 6 
)

Definition at line 76 of file webdav.py.

def indra::ipc::webdav::WebDAV::log (   self,
  msg,
  depth = 0 
)

log docstring 

Definition at line 114 of file webdav.py.

def indra::ipc::webdav::WebDAV::connect (   self  ) 

connect docstring 

Definition at line 138 of file webdav.py.

def indra::ipc::webdav::WebDAV::__err (   self,
  response,
  details 
) [private]

__err docstring 

Definition at line 143 of file webdav.py.

def indra::ipc::webdav::WebDAV::request (   self,
  method,
  path,
  body = None,
  headers = None,
  read_all = True,
  body_hook = None,
  recurse = 0,
  allow_cache = True 
)

request docstring 

Definition at line 149 of file webdav.py.

def indra::ipc::webdav::WebDAV::retry_request (   self,
  method,
  path,
  body,
  headers,
  read_all,
  body_hook,
  recurse 
)

retry_request docstring 

Definition at line 211 of file webdav.py.

def indra::ipc::webdav::WebDAV::propfind (   self,
  path,
  body = None,
  depth = 1 
)

propfind docstring 

Definition at line 221 of file webdav.py.

def indra::ipc::webdav::WebDAV::purge (   self,
  path 
)

issue a squid purge command 

Definition at line 232 of file webdav.py.

def indra::ipc::webdav::WebDAV::get_file_size (   self,
  path 
)

Use propfind to ask a webdav server what the size of
a file is.  If used on a directory (collection) return 0

Definition at line 242 of file webdav.py.

def indra::ipc::webdav::WebDAV::file_exists (   self,
  path 
)

do an http head on the given file.  return True if it succeeds

Definition at line 274 of file webdav.py.

def indra::ipc::webdav::WebDAV::mkdir (   self,
  path 
)

mkdir docstring 

Definition at line 289 of file webdav.py.

def indra::ipc::webdav::WebDAV::delete (   self,
  path 
)

delete docstring 

Definition at line 301 of file webdav.py.

def indra::ipc::webdav::WebDAV::list_directory (   self,
  path,
  dir_filter = None,
  allow_cache = True,
  minimum_cache_time = False 
)

Request an http directory listing and parse the filenames out of lines
like: '<LI><A HREF="X"> X</A>'. If a filter function is provided,
only return filenames that the filter returns True for.

This is sort of grody, but it seems faster than other ways of getting
this information from an isilon.

Definition at line 313 of file webdav.py.

def indra::ipc::webdav::WebDAV::__tmp_filename (   self,
  path_and_file 
) [private]

__tmp_filename docstring 

Definition at line 368 of file webdav.py.

def indra::ipc::webdav::WebDAV::__put__ (   self,
  filesize,
  body_hook,
  remotefile 
)

__put__ docstring 

Definition at line 377 of file webdav.py.

def indra::ipc::webdav::WebDAV::put_string (   self,
  strng,
  remotefile 
)

put_string docstring 

Definition at line 405 of file webdav.py.

def indra::ipc::webdav::WebDAV::put_file (   self,
  localfile,
  remotefile 
)

Send a local file to a remote webdav store.  First, upload to
a temporary filename.  Next make sure the file is the size we
expected.  Next, move the file to its final location.  Next,
check the file size at the final location.

Definition at line 415 of file webdav.py.

def indra::ipc::webdav::WebDAV::create_empty_file (   self,
  remotefile 
)

create an empty file 

Definition at line 436 of file webdav.py.

def indra::ipc::webdav::WebDAV::__get_file_setup (   self,
  remotefile,
  check_size = True 
) [private]

__get_file_setup docstring 

Definition at line 447 of file webdav.py.

def indra::ipc::webdav::WebDAV::__get_file_read (   self,
  writehandle,
  response,
  content_length 
) [private]

__get_file_read docstring 

Definition at line 464 of file webdav.py.

def indra::ipc::webdav::WebDAV::get_file (   self,
  remotefile,
  localfile,
  check_size = True 
)

Get a remote file from a webdav server.  Download to a local
tmp file, then move into place.  Sanity check file sizes as
we go.

Definition at line 484 of file webdav.py.

def indra::ipc::webdav::WebDAV::get_file_as_string (   self,
  remotefile,
  check_size = True 
)

download a file from a webdav server and return it as a string.

Definition at line 504 of file webdav.py.

def indra::ipc::webdav::WebDAV::get_post_as_string (   self,
  remotefile,
  body 
)

Do an http POST, send body, get response and return it.

Definition at line 521 of file webdav.py.

def indra::ipc::webdav::WebDAV::__destination_command (   self,
  verb,
  remotesrc,
  dstdav,
  remotedst 
) [private]

self and dstdav should point to the same http server.

Definition at line 544 of file webdav.py.

def indra::ipc::webdav::WebDAV::rename (   self,
  remotesrc,
  remotedst 
)

rename a file on a webdav server 

Definition at line 562 of file webdav.py.

def indra::ipc::webdav::WebDAV::xrename (   self,
  remotesrc,
  dstdav,
  remotedst 
)

rename a file on a webdav server 

Definition at line 566 of file webdav.py.

def indra::ipc::webdav::WebDAV::copy (   self,
  remotesrc,
  remotedst 
)

copy a file on a webdav server 

Definition at line 572 of file webdav.py.

def indra::ipc::webdav::WebDAV::xcopy (   self,
  remotesrc,
  dstdav,
  remotedst 
)

copy a file on a webdav server 

Definition at line 576 of file webdav.py.


Member Data Documentation

Definition at line 77 of file webdav.py.

Definition at line 78 of file webdav.py.

Definition at line 79 of file webdav.py.

Definition at line 82 of file webdav.py.

Definition at line 94 of file webdav.py.

Definition at line 96 of file webdav.py.

Definition at line 98 of file webdav.py.

Definition at line 110 of file webdav.py.


The documentation for this class was generated from the following file:

Generated on Fri May 16 09:42:29 2008 for SecondLife by  doxygen 1.5.5