Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
Archetypes.tests.test_file_upload.FileLike Class Reference

List of all members.

Public Member Functions

def __init__
def read
def seek
def tell

Public Attributes

 data
 pos

Detailed Description

Definition at line 36 of file test_file_upload.py.


Constructor & Destructor Documentation

Definition at line 38 of file test_file_upload.py.

00038 
00039     def __init__(self, data):
00040         self.data = data
00041         self.pos = 0

Here is the caller graph for this function:


Member Function Documentation

def Archetypes.tests.test_file_upload.FileLike.read (   self,
  chunk = None 
)

Definition at line 42 of file test_file_upload.py.

00042 
00043     def read(self, chunk=None):
00044         if chunk == None:
00045             return self.data
00046         cur = self.pos
00047         next = cur + chunk
00048         self.pos = next
00049         return self.data[cur:next]

Here is the caller graph for this function:

def Archetypes.tests.test_file_upload.FileLike.seek (   self,
  pos,
  start = 0 
)

Definition at line 50 of file test_file_upload.py.

00050 
00051     def seek(self, pos, start=0):
00052         if start == 0:
00053             self.pos = pos
00054         if start == 1:
00055             self.pos += pos
00056         if start == 2:
00057             self.pos = len(self.data) - pos

Definition at line 58 of file test_file_upload.py.

00058 
00059     def tell(self):
00060         return self.pos
00061 


Member Data Documentation

Definition at line 39 of file test_file_upload.py.

Definition at line 40 of file test_file_upload.py.


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