Android Utililty Methods File Remove

List of utility methods to do File Remove

Description

The list of methods to do File Remove are organized into topic(s).

Method

voidremove(File file)
remove
if (file != null) {
    if (!file.isDirectory()) {
        file.delete();
    } else {
        String[] children = file.list();
        int size = children.length;
        for (int i = 0; i < size; i++) {
            remove(new File(file, children[i]));
...
voidremove(String filePath)
remove
try {
    File file = new File(filePath);
    remove(file);
} catch (Exception e) {
    e.printStackTrace();
voiddeleteAllFiles(Vector filesToDelete)
delete All Files
for (int i = 0; i < filesToDelete.size(); i++) {
    ((File) filesToDelete.get(i)).delete();
BooleanremoveFile(String absPath)
Xoa 1 file khoi he thong
if (absPath == null || absPath.equals("")) {
    return false;
File f = new File(absPath);
if (f.isFile()) {
    return f.delete();
return false;
...