Example #1
0
 def cp_fd(self, name, fd):
     total = 0
     self.START_OPERATION('cp_fd')
     try:
         total = pcardext.cp(name, fd)
     finally:
         self.END_OPERATION('cp_fd')
         return total
Example #2
0
 def cp(self, name, local_file, openclose=True):
     self.START_OPERATION('cp')
     total = 0
     try:
         f = file(local_file, 'w')
         total = pcardext.cp(name, f.fileno())
         f.close()
     finally:
         self.END_OPERATION('cp', openclose)
         return total