K
Krick
In Java, I need to be able to check whether a file is in use.
So far, the only the only method I can come up with is this (in pseudo code)...
1. make a copy of the original file (block copy the binary contents)
2. attempt to delete the original file
3a. if delete fails, file is in use, delete copy
3b. if delete succeeds, rename copy to original name
Will this work?
Am I missing anything?
What about cross platform compatability?
....
Krick
So far, the only the only method I can come up with is this (in pseudo code)...
1. make a copy of the original file (block copy the binary contents)
2. attempt to delete the original file
3a. if delete fails, file is in use, delete copy
3b. if delete succeeds, rename copy to original name
Will this work?
Am I missing anything?
What about cross platform compatability?
....
Krick