Blog
FTP servers are accessed through the fs library and any method the library supports is available to Zato services as well. Hence, the code below serves as a set of examples only, it is not a full reference.
from zato.server.service import Service
class MyService(Service):
def handle(self):
conn = self.outgoing.ftp.get('My FTP')
contents = conn.setcontents('/tmp/myfile', 'Hello\nFTP!\n')
from zato.server.service import Service
class MyService(Service):
def handle(self):
conn = self.outgoing.ftp.get('My FTP')
listing = conn.listdir('/usr')
self.logger.info(listing)
from zato.server.service import Service
class MyService(Service):
def handle(self):
conn = self.outgoing.ftp.get('My FTP')
contents = conn.getcontents('/tmp/myfile')
self.logger.info(contents)
Book a demo with an expert who will help you build meaningful systems that match your ambitions
"For me, Zato Source is the only technology partner to help with operational improvements."