Hello!
How can i check if a file exist on cloud ?
Thank you!
Hello!
How can i check if a file exist on cloud ?
Thank you!
Hi,
You can use the Search call to find out if a specific filename already exists on the cloud storage drive.
I cannot manage, can you send me an example please?
TMSFNCCloudDropBox1.Search('foldername', 'filename.ext');
You can use an empty string as the first parameter to search in the root folder.
Thank you for answer,
I know this, but i don't understand how to get the result "true/false" if file exist or not !?
...
If the ASearchResults.Count of the OnSearch event is higher than 0, the file exists.
procedure TForm1.TMSFNCCloudDropBox1Search(Sender: TObject;
const ASearchResults: TTMSFNCCloudDropBoxItems;
const ARequestResult: TTMSFNCCloudBaseRequestResult);
var
FileExists: boolean;
begin
FileExists := ASearchResults.Count > 0;
TTMSFNCUtils.Log(BoolToStr(FileExists, True));
end;
Thank you!