【问题标题】:how to access to file stored in \StartUp\Documents\?如何访问存储在 \StartUp\Documents\ 中的文件?
【发布时间】:2020-05-21 18:41:23
【问题描述】:

在 iOS 中,我如何访问部署在“\StartUp\Documents\”中的文件?它看起来像是部署资源的路径,但我不知道如何从正在运行的应用程序中找到路径。我试试:

TPath.Combine(TPath.GetHomePath, 'StartUp/Documents/mypict.png')

没有任何成功:(

【问题讨论】:

标签: ios delphi firemonkey


【解决方案1】:

您在部署设置中部署到 StartUp/Documents 的文件会在应用首次运行时通过 System.StartupCopy.pas 复制到您的应用沙箱文档文件夹中。要访问这些文件,您可以使用以下代码:

TPath.Combine(TPath.GetDocumentsPath, 'mypict.png')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-02-08
    • 2021-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-20
    • 2017-06-01
    相关资源
    最近更新 更多