Tabnine Logo
FileUtils$FileLock
Code IndexAdd Tabnine to your IDE (free)

How to use
FileUtils$FileLock
in
com.lody.virtual.helper.utils

Best Java code snippets using com.lody.virtual.helper.utils.FileUtils$FileLock (Showing top 9 results out of 315)

origin: android-hacker/VirtualXposed

FileChannel fileChannel = fileLockCount.fChannel;
try {
  if (RefCntDec(lockFile.getAbsolutePath()) <= 0) {
    if (fileLock != null && fileLock.isValid()) {
      fileLock.release();
origin: android-hacker/VirtualXposed

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
origin: bzsome/VirtualApp-x326

FileChannel fileChannel = fileLockCount.fChannel;
try {
  if (RefCntDec(lockFile.getAbsolutePath()) <= 0) {
    if (fileLock != null && fileLock.isValid()) {
      fileLock.release();
origin: darkskygit/VirtualApp

FileChannel fileChannel = fileLockCount.fChannel;
try {
  if (RefCntDec(lockFile.getAbsolutePath()) <= 0) {
    if (fileLock != null && fileLock.isValid()) {
      fileLock.release();
origin: bzsome/VirtualApp-x326

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
origin: darkskygit/VirtualApp

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
origin: bzsome/VirtualApp-x326

public static FileLock getInstance() {
  if (singleton == null) {
    singleton = new FileLock();
  }
  return singleton;
}
origin: darkskygit/VirtualApp

public static FileLock getInstance() {
  if (singleton == null) {
    singleton = new FileLock();
  }
  return singleton;
}
origin: android-hacker/VirtualXposed

public static FileLock getInstance() {
  if (singleton == null) {
    singleton = new FileLock();
  }
  return singleton;
}
com.lody.virtual.helper.utilsFileUtils$FileLock

Javadoc

Lock the specified fle

Most used methods

  • <init>
  • RefCntDec
  • RefCntInc

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now