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

Method ensureExists

app/src/main/java/eu/faircode/email/Helper.java:2876–2887  ·  view source on GitHub ↗
(Context context, String subdir)

Source from the content-addressed store, hash-verified

2874 private static final Map<File, Boolean> exists = new HashMap<>();
2875
2876 static File ensureExists(Context context, String subdir) {
2877 File dir = new File(context.getFilesDir(), subdir);
2878 dir.mkdirs();
2879
2880 synchronized (exists) {
2881 if (exists.containsKey(dir))
2882 return dir;
2883 exists.put(dir, true);
2884 }
2885
2886 return dir;
2887 }
2888
2889 static File getExternalFilesDir(Context context) {
2890 return getExternalFilesDir(context, null);

Callers 15

processUriMethod · 0.95
getCacheFileMethod · 0.95
onExecuteMethod · 0.95
onExecuteMethod · 0.95
updateSyncdataMethod · 0.95
receiveRemoteDataMethod · 0.95
onAddImageMethod · 0.95
onExecuteMethod · 0.95
onExecuteMethod · 0.95
getFileMethod · 0.95
convertMethod · 0.95
getRefFileMethod · 0.95

Calls 2

containsKeyMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected