- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 得到不同平台的录音文件保存路径
uses
System.IOUtils; // 需要引入
// 得到不同平台的录音文件保存路径
function GetAudioFileName(const AFileName: string): string;
begin
{$IFDEF ANDROID}
Result := TPath.GetTempPath + '/' + AFileName;
{$ELSE}
{$IFDEF IOS}
Result := TPath.GetHomePath + '/Documents/' + AFileName;
{$ELSE}
Result := AFileName;
{$ENDIF}
{$ENDIF}
end;