Original Author Paul Laughton, 2011
Page 126
De Re BASIC!
The destination file is relative to the current working directory on the server. If you want to upload to a
subdirectory of the current working directory, specify the path to that directory. For example, if there is
a subdirectory named "etc" then the filename, "/etc/name" would upload the file into that subdirectory.
Ftp.get <source_sexp>, <destination_sexp>
The source file on the connected ftp server is downloaded to the specified destination file on the
Android device.
You can specify a subdirectory in the server source file string.
The destination file path is relative to "<pref base drive>/rfo-basic/data/" If you want to download a
BASIC! source file, the path would be, "../source/xxx.bas".
Ftp.dir <list_nvar> {,<dirmark_sexp>}
Creates a list of the names of the files and directories in the current working directory and places it in a
BASIC! List data structure. A pointer to the new List is returned in the variable <list_nvar>.
A directory is identified by a marker appended to its name. The default marker is the string "(d)". You
can change the marker with the optional directory mark parameter <dirmark_sexp>. If you do not want
directories to be marked, set <dirmark_sexp> to an empty string, "".
The following code can be used to print the file names in that list:
ftp.dir file_list
list.size file_list,size
for i = 1 to size
list.get file_list,i,name$
print name$
next i
Changes the current working directory to the specified new directory.
Ftp.rename <old_filename_sexp>, <new_filename_sexp>
Renames the specified old filename to the specified new file name.
Deletes the specified file.
Removes (deletes) the specified directory if and only if that directory is empty.