MCPcopy Create free account
hub / github.com/M66B/FairEmail / secureDelete

Method secureDelete

app/src/main/java/eu/faircode/email/Helper.java:3149–3161  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

3147 }
3148
3149 static void secureDelete(File file) {
3150 try {
3151 if (file.exists()) {
3152 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
3153 if (!file.delete())
3154 Log.w("File not found: " + file);
3155 } else
3156 Files.delete(Paths.get(file.getAbsolutePath()));
3157 }
3158 } catch (IOException ex) {
3159 Log.e(ex);
3160 }
3161 }
3162
3163 static long getAvailableStorageSpace() {
3164 return getAvailableStorageSpace(Environment.getDataDirectory().getAbsolutePath());

Callers 15

onExecuteMethod · 0.95
saveMethod · 0.95
loadMethod · 0.95
deleteMethod · 0.95
onExecuteMethod · 0.95
addAttachmentMethod · 0.95
resizeAttachmentMethod · 0.95
onExecuteMethod · 0.95
cleanupMethod · 0.95
runMethod · 0.95
getEmailLookupMethod · 0.95
onExecuteMethod · 0.95

Calls 5

wMethod · 0.95
eMethod · 0.95
existsMethod · 0.45
deleteMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected