Search code examples
iosdelphifiremonkey

how to access to file stored in \StartUp\Documents\?


In iOS, how can I access files deployed in "\StartUp\Documents\"? it's look like it's the path where resources get deployed, but I don't know how to find the path from the running app. i try:

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

without any success :(


Solution

  • The files you deploy to StartUp/Documents in your Deployment settings get copied into your apps sandbox documents folder by System.StartupCopy.pas when the app first runs. To access those files you can use the following code:

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