Dear all
It’s an ios specific question. i want my user to select an existing text file with ios native file chooser and then to append a text at the end of it.
In ios I use the “open” file browser (native version) as in the demo. I get the file url and then get the corresponding File object (“resultfile” in the following code).
I try to create an FileOutputStream but output.openedOk() always return False…
I can’t understand why… Any idea ? is it a problem with iOS file manegement/protection ?
Thanks in advance for any hint !
if (result.isLocalFile()){
auto resultfile=result.getLocalFile();
// bool success =resultfile.appendText(“TEST APPEND”);
FileOutputStream output (resultfile);
if (output.openedOk())
{
bool success = output.writeText(“TESTString”, false, false, “\r\n”);
output.flush();if (success){ AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, "File Chooser...", "appended"); } else { AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, "File Chooser...", "append error"); } } else { AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, "File Chooser...", "Can't open"); } }
