comparison src/plugins/plugin_misc_file.py @ 1568:1f7a34d499e0

plugins XEP-0234, file: use of SatFile for writing too
author Goffi <goffi@goffi.org>
date Sun, 08 Nov 2015 14:44:33 +0100
parents ebf97c1ac14a
children babd97d80049
comparison
equal deleted inserted replaced
1567:268fda4236ca 1568:1f7a34d499e0
63 63
64 def close(self): 64 def close(self):
65 self._file.close() 65 self._file.close()
66 self.host.removeProgressCb(self.uid, self.profile) 66 self.host.removeProgressCb(self.uid, self.profile)
67 67
68 def flush(self):
69 self._file.flush()
70
71 def write(self, buf):
72 self._file.write(buf)
73
68 def read(self, size=-1): 74 def read(self, size=-1):
69 read = self._file.read(size) 75 read = self._file.read(size)
70 if not read: 76 if not read:
71 self.eof.callback(None) 77 self.eof.callback(None)
72 return read 78 return read