Results 1 to 4 of 4
Thread: lock a file
- 08-16-2008, 12:00 AM #1
Member
- Join Date
- Aug 2008
- Posts
- 3
- Rep Power
- 0
- 08-19-2008, 05:57 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
What you have tried so far?
And also better to explain little more about what you trying to work on the file lock. Do you want to change some file attribute?
- 08-19-2008, 02:55 PM #3
I had the same question time ago (don't know if in this forum) and the explanations were something like: It is not possible to get a reliable file locking because there is no link/integration between java and underlying OS handling of file locks - at least no integration that works on all OSes (the same way).
But I found this - although not tried myself if it works:
Thinking in Java 12: The Java I/O System - File lockingGreetings, Martin Wildam.
- 08-19-2008, 03:00 PM #4
Here is another link - mentioning that it may behave differently depending on the underlying OS used:
Java Tips - How to create a file lock on a fileGreetings, Martin Wildam.
Similar Threads
-
File fp = new File(filePath);fp.exists() does not yeild proper result
By ganeshp in forum Advanced JavaReplies: 2Last Post: 04-07-2009, 06:25 AM -
play vedio file and flash file in swing
By rajasekharreddym in forum AWT / SwingReplies: 1Last Post: 07-30-2008, 08:22 PM -
To open an image file such as Jpeg file using JAva Program
By itmani2020 in forum Advanced JavaReplies: 10Last Post: 07-11-2008, 09:57 AM -
How to parse the CSV(Comma separation values)file and validate the file using java
By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM -
object lock question
By simon in forum New To JavaReplies: 2Last Post: 08-01-2007, 04:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks