aehlke commented on issue #346:
URL:
https://github.com/apache/cordova-plugin-file/issues/346#issuecomment-1644264101
maybe adjacently useful code, borrowed from thebaselab/codeapp which uses
this logic to cover the /private/ issue in another context
```
fileprivate func getRootDirectory() -> URL {
// We want ./private prefix because all other files have it
if let documentsPathURL = FileManager.default.urls(for:
.documentDirectory, in: .userDomainMask)
.first
{
#if targetEnvironment(simulator)
return documentsPathURL
#else
if let standardURL = URL(
string: documentsPathURL.absoluteString.replacingOccurrences(
of: "file:///", with: "file:///private/"))
{
return standardURL
} else {
return documentsPathURL
}
#endif
} else {
fatalError("Could not locate Document Directory")
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]