Package flumotion :: Package component :: Package misc :: Package httpserver :: Module localpath :: Class LocalPath
[hide private]

Class LocalPath

source code

           object --+    
                    |    
fileprovider.FilePath --+
                        |
                       LocalPath
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, path)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
MediaPath
child(self, name)
Returns: a FilePath that point at the specified child
source code
AsyncFile
open(self)
Returns: the pointed file opened as an asynchronous file
source code
str
_getChildPath(self, name)
Returns: the path of the child
source code

Inherited from fileprovider.FilePath: getMimeType

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  contentTypes = {'.a': 'application/octet-stream', '.ai': 'appl...
  mimeType = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

child(self, name)

source code 
Parameters:
  • name - the name of a child of the pointed directory
Returns: MediaPath
a FilePath that point at the specified child
Raises:
Overrides: fileprovider.FilePath.child
(inherited documentation)

open(self)

source code 
Returns: AsyncFile
the pointed file opened as an asynchronous file
Raises:
  • NotFoundError - if the file does not exists anymore
  • AccessError - if the file cannot be opened because of right restriction
Overrides: fileprovider.FilePath.open
(inherited documentation)

_getChildPath(self, name)

source code 
Parameters:
  • name (str) - the name of a child of the pointed directory
Returns: str
the path of the child
Raises:

Class Variable Details [hide private]

contentTypes

Value:
{'.a': 'application/octet-stream',
 '.ai': 'application/postscript',
 '.aif': 'audio/x-aiff',
 '.aifc': 'audio/x-aiff',
 '.aiff': 'audio/x-aiff',
 '.au': 'audio/basic',
 '.avi': 'video/x-msvideo',
 '.bat': 'text/plain',
...