Use Delphi XE5 android app to list all files in storage
•
Android
How do I list files in the SD card path and internal memory path?
I tried findfile with getdocumentspath as a parameter. I had no luck
Oh, where can I find more Delphi documents or code snippets for Android?
resolvent:
Add system.ioutils to the uses clause. Then, you can use the codes tpath and tdirectory, as shown below:
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;
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码