Сегодня я тестировал «файлы» вместо обычного пути.
Вот мой код:OutputStreamWriter содержит разделитель путей
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();
}
}
В коде ошибки приходит каждый раз: illegal Arguments: contains a path seperator
!
Спасибо за вашу помощь, заранее
Всегда предоставляйте полное исключение. – Hrabosch