17
file.delete () retorna falso, embora file.exists (), file.canRead (), file.canWrite (), file.canExecute () retornem verdadeiro
Estou tentando excluir um arquivo, depois de escrever algo nele, com FileOutputStream. Este é o código que uso para escrever: private void writeContent(File file, String fileContent) { FileOutputStream to; try { to = new FileOutputStream(file); to.write(fileContent.getBytes()); to.flush(); to.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } …