Android Question FTP object: FTPEntry structure - why is it read-only ?

peacemaker

Expert
Licensed User
Longtime User
HI, All
Why FTPEntry is read-only ? It would be convenient to store there info during work with FTP.

Who is Java-master, maybe to recompile the NET lib to have FTPEntry something like...
B4X:
Type FTPEntry2(id As Int, name As String, timestamp As Long, size As Long, FTPpath As String, LocalPath As String, status As String, DeleteAfter As Boolean) 'writable file info structure (FTP FTPEntry structure is read-only)
and writeable...
 

DonManfred

Expert
Licensed User
Longtime User
Create a FTPEntry2 Type in your main module.

When getting a FTPEntry create a new FTPEntry2 based on the Values from FTPEntry.
Work with FTPEntry2 which is not writeprotected.

Types, List or Maps create in a Library are readonly in B4A.
You always can create a new Map/List/Type based on the Original data.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Work with FTPEntry2 which is not writeprotected.

Yes, Don. My post is due to it's a pain to work so - always to sync one structure with another... Instead of just reading\writing...
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User

I like the Type as it's easy to update and upgrage, but it needs lots of subs that all have the loop to work with such custom array, or list. To get any info, or save it - it needs to iteray the list .... Head is in pain
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Issue is that FTPEntry can be got only after FTP.List, of all the files, and it's hard to process each file one by one: check, download if new, check again...
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…