android - [File Export]No such file or directory -


i want export file sdcard, have log message:

04-11 18:34:22.383: debug/carburant(5734): /mnt/sdcard/carburant/alaa.peugeot.settings.dat (is directory) 

i want have alaa.peugeot.settings.dat not directory, file. here code:

try{             final sharedpreferences preferences = preferencemanager             .getdefaultsharedpreferences(context);     string filename = context.getresources().getstring(r.string.filename);     string filedir = "" + preferences.getstring("login", "") + "."+ preferences.getstring("marque", "") + ".";              file dir = new file (sdcard.getabsolutepath() + "/carburant");             dir.mkdirs();             file file = new file(dir, filedir+filename);             outputstream out = new fileoutputstream(file);             file f1 = new file(context.getfilesdir(), filedir+filename);             inputstream in = new fileinputstream(f1); 

what going on code? thank much.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -