1

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++
Tom Macdonald
  • 6,433
  • 7
  • 39
  • 59

1 Answers1

0

Can you print an example of what is contained inside m_uri when your code runs?

If the path you are feeding open() does not have a leading /, then it will look from the app's home directory which is not what you want.

user800183
  • 188
  • 7