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

Method FileLocker

java/com/facebook/soloader/FileLocker.java:35–47  ·  view source on GitHub ↗
(File lockFile)

Source from the content-addressed store, hash-verified

33 }
34
35 private FileLocker(File lockFile) throws IOException {
36 mLockFileOutputStream = new FileOutputStream(lockFile);
37 FileLock lock = null;
38 try {
39 lock = mLockFileOutputStream.getChannel().lock();
40 } finally {
41 if (lock == null) {
42 mLockFileOutputStream.close();
43 }
44 }
45
46 mLock = lock;
47 }
48
49 @Override
50 public void close() throws IOException {

Callers

nothing calls this directly

Calls 2

lockMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected