PDA

View Full Version : How to detect if a file is being used?



richardander
10th June 2009, 10:08
Hi,

My application is going to load a file and modify. Before loading the file, is there anyway to find out if the file is being opened by another application?

thank you!

e8johan
10th June 2009, 10:14
Only if that other application has locked it (works in some file systems) or if you device a locking scheme (usually a hidden file)

richardander
10th June 2009, 22:27
Does QT provide any function to check it?

SABROG
11th June 2009, 19:30
You can use QtLockedFile (http://www.qtsoftware.com/products/appdev/add-on-products/catalog/4/Utilities/qtlockedfile)