def setcontents(self, path, data=b'', encoding=None, errors=None, chunk_size=1024 * 64): path = normpath(path) data = iotools.make_bytes_io(data, encoding=encoding, errors=errors) self.refresh_dircache(dirname(path)) self.ftp.storbinary('STOR %s' % _encode(path), data, blocksize=chunk_size)
def setcontents(self, path, data=b'', encoding=None, errors=None, chunk_size=1024*64, **kwargs): path = normpath(path) data = iotools.make_bytes_io(data, encoding=encoding, errors=errors) self.refresh_dircache(dirname(path)) self.ftp.storbinary('STOR %s' % _encode(path), data, blocksize=chunk_size)