Aujourd'hui, j'ai testé des "fichiers" au lieu d'un chemin normal.
Voici mon code:OutputStreamWriter contient un séparateur de chemin
File path=new File(getFilesDir(),"uf");
File test = new File(path.getAbsolutePath(),"test.txt");
if(!path.exists()){
path.mkdir();
}
if(!test.isFile()){
try {
test.createNewFile();
} catch (IOException e) {
//TODO in errorlog -> filecreation
e.printStackTrace();
}
}else{
try {
OutputStreamWriter mywriter = new OutputStreamWriter(openFileOutput(test.getAbsolutePath().toString(),Context.M ODE_PRIVATE));
mywriter.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
Dans le code d'erreur vient chaque fois: illegal Arguments: contains a path seperator
!
Merci pour votre aide à l'avance
Toujours fournir une exception complète. – Hrabosch