use of com.amaze.filemanager.file_operations.filesystem.FolderState in project AmazeFileManager by TeamAmaze.
the class MainActivityHelper method deleteFiles.
public void deleteFiles(ArrayList<HybridFileParcelable> files) {
if (files == null || files.size() == 0)
return;
if (files.get(0).isSmb()) {
new DeleteTask(mainActivity).execute((files));
return;
}
@FolderState int mode = checkFolder(files.get(0).getParent(mainActivity), files.get(0).getMode(), mainActivity);
if (mode == CAN_CREATE_FILES) {
mainActivity.oparrayList = (files);
mainActivity.operation = DELETE;
} else if (mode == WRITABLE_OR_ON_SDCARD || mode == DOESNT_EXIST)
new DeleteTask(mainActivity).execute((files));
else
Toast.makeText(mainActivity, R.string.not_allowed, Toast.LENGTH_SHORT).show();
}
Aggregations