unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
IOUtils, FMX.ScrollBox, FMX.Memo, FMX.Controls.Presentation, FMX.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
var
DirList: TStringDynArray;
DirPath: string;
s: string;
begin (*
DirPath := TPath.Combine(TPath.GetDocumentsPath, 'assets');
DirPath := TPath.Combine(DirPath, 'internal'); *)
DirPath := TPath.GetSharedCameraPath+'/camera/';
// Display where we're looking for the files
Memo1.Lines.Add('Searching ' + DirPath);
if TDirectory.Exists(DirPath, True) then
begin
// Get all files. Non-Windows systems don't typically care about
// extensions, so we just use a single '*' as a mask.
DirList := TDirectory.GetFiles(DirPath, '*');
// If none found, show that in memo
if Length(DirList) = 0 then
Memo1.Lines.Add('No files found in ' + DirPath)
else // Files found. List them.
begin
for s in DirList do
Memo1.Lines.Add(s);
end;
end
else
Memo1.Lines.Add('Directory ' + DirPath + ' does not exist.');
end;
end.
Subscribe to:
Post Comments (Atom)
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required.
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required. h...
-
Grows your business with zomok online ordering platform. Zero commission. Suitable for restaurants, kopitiam, food, groceries, pet supplie...
-
Complete TFTP Server example, using Indy components There are not many good TFTP server examples out there, so I wrote this example of...
c语言示例代码
ReplyDeletec编程中的双链表单片段示例代码