MCPcopy Create free account
hub / github.com/facebook/SoLoader / deleteOrThrow

Method deleteOrThrow

java/com/facebook/soloader/SysUtil.java:77–87  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

75 }
76
77 public static void deleteOrThrow(File file) throws IOException {
78 final File folder = file.getParentFile();
79 // We need write permission on parent folder to delete the file
80 if (folder != null && !folder.canWrite() && !folder.setWritable(true)) {
81 LogUtil.e(TAG, "Enable write permission failed: " + folder);
82 }
83
84 if (!file.delete() && file.exists()) {
85 throw new IOException("Could not delete file " + file);
86 }
87 }
88
89 /**
90 * Return an list of ABIs we supported on this device ordered according to preference. Use a

Callers 1

dumbDeleteMethod · 0.95

Calls 1

eMethod · 0.95

Tested by

no test coverage detected