fs.rpcfs¶
This module provides the class ‘RPCFS’ to access a remote FS object over
XML-RPC. You probably want to use this in conjunction with the ‘RPCFSServer’
class from the xmlrpc
module.
-
class
fs.rpcfs.
RPCFS
(uri, transport=None)¶ Access a filesystem exposed via XML-RPC.
This class provides the client-side logic for accessing a remote FS object, and is dual to the RPCFSServer class defined in fs.expose.xmlrpc.
Example:
fs = RPCFS("http://my.server.com/filesystem/location/")
Constructor for RPCFS objects.
The only required argument is the URI of the server to connect to. This will be passed to the underlying XML-RPC server proxy object, along with the ‘transport’ argument if it is provided.
Parameters: uri – address of the server -
decode_path
(path)¶ Decode paths arriving over the wire.
-
encode_path
(path)¶ Encode a filesystem path for sending over the wire.
Unfortunately XMLRPC only supports ASCII strings, so this method must return something that can be represented in ASCII. The default is base64-encoded UTF8.
-
-
class
fs.rpcfs.
ReRaiseFaults
(obj)¶ XML-RPC proxy wrapper that re-raises Faults as proper Exceptions.
-
fs.rpcfs.
re_raise_faults
(func)¶ Decorator to re-raise XML-RPC faults as proper exceptions.