List of all files stored in the Delphi XE5 Android application

How to list files on the way to the SD card and internal memory?

I tried FindFile with GetDocumentsPath as a parameter, and I was out of luck.

Oh, where can I find additional documentation or code snippets for Delphi for Android?

+4
source share
1 answer

Add System.IOUtils to your offer. Then you can use the TPath and TDirectory something like this:

 uses System.IOUtils, System.Types; procedure TForm1.Button1Click(Sender: TObject); var FileList: TStringDynArray; DocDir: string; s: string; begin Memo1.Lines.Clear; DocDir := TPath.GetDocumentsPath; FileList := TDirectory.GetFiles(DocDir); for s in FileList do Memo1.Lines.Add(s); end; 
+3
source

Source: https://habr.com/ru/post/1502764/


All Articles