[Gambas-user] Can Gambas write directly from a String variable to a remote file via FTP?
Phan Damily
phandamily at yahoo.com
Wed Feb 14 19:18:17 CET 2018
I've been teaching myself FTPCLIENT.
What I'm trying to do is to modify a file on a remote server "on the fly", as quickly as possible, using FTP. I'm able to read the remote file into a String variable in Gambas using FTP.Then, I modify the String variable in whatever way needed using Gambas string functions. Once that's done, what I'm trying to do is write the data from that String variable to the remote file via FTP, overwriting all its contents with the modified data from the String variable.
>From the code examples I'm finding in searches (most are 10 years old, or older), the only way it seems possible to do this is to first write the data from the String variable to a local file first. And then send that local file to the remote server via FTP, overwriting the original file, using FTPCLIENT's Put method.
I can do that. But it seems like unnecessary overhead and unnecessary extra steps, if the modification can be done directly from the String variable.
Is there a newer method in Gambas 3.10.0 that wasn't available 10 years ago that allows this to be done? Or is it a limitation of the FTP protocol? Is there a way to trick Gambas into thinking a String variable is a file? Is there some other protocol Gambas supports that would be more suited to directly modifying remote files without the overhead of using temp files?
Thanks for reading.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180214/721e1d17/attachment.html>
More information about the User
mailing list