I am writing a Blackberry 10 Cascades app. I am trying to open a file which is an email attachment.
int in_fd = open(m_uri.replace("file://","").toUtf8().constData(), O_RDONLY);
(There's a reason I am using the open() call)
But the file cannot be opened. I understand that this is to do with sandboxing and app permissions, and that the Invocation framework can make a copy of the file in the target app's directory. What I can't figure out is how to get the path to that file so that I can open it.
I need to know:
- How to make sure the Invocation Framework copies the file to my apps sandbox on invocation.
- How to access the resulting copied file.
- In C++