Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Your best bet is to set an exclusive lock on the file. If file is open by other processes, you will get an exception. For example,
Code:File file = new File(fileName); FileChannel channel = new RandomAccessFile(file, "rw").getChannel(); // Get an exclusive lock on the whole file FileLock lock = channel.lock(); try { lock = channel.tryLock(); // Ok. You get the lock } catch (OverlappingFileLockException e) { // File is open by someone else } finally { lock.release(); }