6 Replies Latest reply on Sep 12, 2010 5:30 AM by 843790

    Folder Locking using java

      Hi All,
      I want to implement the folder locking using java.But i can't find any method to implement my requirement. I find one method to lock a file using FileChannelObject.tryLock() or FileChannelObject.lock() methods of FileLock class. But the main problem is that FileChannel object is coming through only by calling getChannel() method on a RandomAccessFile object or FileInputStream object only.
      If i want to lock a folder i am not able to create the lock on it. So please provide me any example to create a lock on  a directory.

      Thanks in advance.