Bookmark a folder

Hi all,

what i'm trying to do is to save in some way the current folder of a TTMSFMXCloudStorageFMX, and setting that folder "current" again when i connect to the cloud the next time.

If i've understood well, every cloud storage provider has his own technical ways to manage folders. Teorically, i would need to save the TTMSFMXCloudItem of the current folder like a "bookmark", but i don't know if it's possible , and if the next time i can use it to select the folder.

The "manageable" way i've found until now is to scan recursively (down to up) the tree structure (using the .ParentFolder property), to "compose" the path of the folder, and use the path the next time to automatically go to that folder .

I'm missing the point ? there is a smarter way ?

Thanks, regards



This depends on the cloud storage service you are using.
Some services provide the path of the folder as part of the item data, others don't.
If the path is not available you will indeed have to recursively scan the tree structure.

For example a TDropBoxItem has a FullPath property that contains the path of the file.

Thank you Bart. I'm trying to use several different cloud storage services with the same code.

I'm making a scan of the tree structure, i'm testing it . I save the cloud folder in a string like
(it's easy, going up from the current folder with the .ParentFolder property), and then a re-select the folder going "down" from root (recursively) with the .Folder property (the TTMSFMXCloudItems collection).

Thanks, ciao !