(tested on iOS)
Why do I get two different results when I create a new XML file in the xmlFolder (cf. textEditorReturnKeyPressed) :
- if I set the directoryList directory to xmlFolder, I don’t see the created files
- if I set the directoryList directory to xmlFolder.getParentDirectory(), I can see the files by browsing and unfolding the “XMLdocs” folder.
Initialization :
directoryList.setDirectory (xmlFolder , true, true);
File path = File::getSpecialLocation(File::currentApplicationFile);
String sPath = path.getFullPathName();
sPath += "/XMLdocs";
xmlFolder = File(sPath);
xmlFolder.createDirectory();
directoryList.setDirectory (xmlFolder , true, true);
//////////////
void textEditorReturnKeyPressed (TextEditor& te) override
{
hideKeyboard();
saveAsXML();
fileTreeComp.refresh();
}
void saveAsXML()
{
XmlElement *xmlAppState = arbre.createXml();
String sPath = xmlFolder.getFullPathName();
userEnteredFileName = textGUI->textEditor.getText();
sPath += "/";
sPath += userEnteredFileName;
sPath += ".xml";
File fileToSave = File(sPath);
xmlAppState->writeToFile(fileToSave, "");
}