获取工作目录

文件操作 / 基本操作

uses System.IOUtils;

var
  Path1, Path2: string;
begin
  Path1 := TDirectory.GetCurrentDirectory;

  //文档文件夹:移动平台上可写的位置
  Path2 := TPath.GetDocumentsPath;

  WriteLn(Path1);
  WriteLn(Path2);
end.