How do I list files in SD card path and internal memory path?
I've tried FindFile with GetDocumentsPath as the parameter and i have no luck.
Ouch, where can I find more documentation or code snippets for Delphi for Android?
Add System.IOUtils
to your uses clause. You can then use code 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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With