android - How to delete a file that exists -


possible duplicate:
how delete file sd card?

this should simple people, want know how delete file in sd card (/sdcard/folder) if exists i.e?

try this:

file folder = environment.getexternalstoragedirectory(); string filename = folder.getpath() + "/folder/image1.jpg";  file myfile = new file(filename); if(myfile.exists())     myfile.delete(); 

Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

c# - HwndSource win32 integration with Ribbons and KeyTips -