Package wtf :: Package app :: Package services :: Module resources :: Class FileResource
[hide private]
[frames] | no frames]

Class FileResource

source code

object --+
         |
        FileResource

Resource representing a file
Instance Methods [hide private]
 
__init__(self, directory, resource, filename)
Initialization
source code
ResourceStream
open(self, mode='rb', buffering=-1, blockiter=1)
Open the file
source code

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

Instance Variables [hide private]
Resource directory
The directory resource
str filename
The full file name
unicode resource
The file resource name
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, directory, resource, filename)
(Constructor)

source code 
Initialization
Parameters:
  • directory (Resource) - The directory resource
  • resource (unicode) - The file resource name
  • filename (str) - The full file name
Overrides: object.__init__

open(self, mode='rb', buffering=-1, blockiter=1)

source code 
Open the file
Parameters:
  • mode (str) - The opening mode
  • buffering (int) - Buffering spec
  • blockiter (int) - Iterator mode (1: Line, <= 0: Default chunk size, > 1: This chunk size)
Returns: ResourceStream
The open stream