Package flumotion :: Package component :: Package misc :: Package httpserver :: Module fileprovider :: Class FilePath
[hide private]

Class FilePath

source code

object --+
         |
        FilePath
Known Subclasses:

I am pointing at a path in the file repository. I can point at a file or at a directory. I can open the pointed file object. I'm used to browse file repository to lookup for file.

Instance Methods [hide private]
str
getMimeType(self)
Returns: the mime type of the pointed file or None if unknown
source code
MediaPath
child(self, name)
Returns: a FilePath that point at the specified child
source code
AsyncFile | defer.Deferred
open(self)
Returns: the pointed file opened as an asynchronous file or a deferred that will be called back with one.
source code

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

Properties [hide private]
str mimeType

Inherited from object: __class__

Method Details [hide private]

getMimeType(self)

source code 
Returns: str
the mime type of the pointed file or None if unknown

child(self, name)

source code 
Parameters:
  • name (str) - the name of a child of the pointed directory
Returns: MediaPath
a FilePath that point at the specified child
Raises:

open(self)

source code 
Returns: AsyncFile | defer.Deferred
the pointed file opened as an asynchronous file or a deferred that will be called back with one.
Raises:
  • NotFoundError - if the file does not exists anymore
  • AccessError - if the file cannot be opened because of right restriction

Property Details [hide private]

mimeType

Get Method:
getMimeType(self) - Returns: the mime type of the pointed file or None if unknown
Type:
str