I have a problem when trying to download a test file to my FTP server, it will respond with "Read-only file system". Thanks in advance.
public boolean Conectar(String host, int port, String user, String pass){
boolean status;
try {
connect(host, port);
enterLocalPassiveMode();
if (FTPReply.isPositiveCompletion(getReplyCode())) {
login(user, pass);
setFileType(BINARY_FILE_TYPE);
}
Log.i(TAG, "Se conectou ao servidoor.");
status = true;
} catch (Exception e) {
Log.e(TAG, "Não foi possível se conectar ao servidor. "+e.getMessage);
status = false;
}
return status;
}
public void Download(){
try{
String filename = "teste.xml";
FileOutputStream fos = new FileOutputStream(filename);
retrieveFile("/"+filename,fos);
}catch(Exception e){
Log.e(TAG, " "+e.getMessage());
}
}