Checking is a file has been already locked...
-
Hi, how can i check, given a file name, if the file has been 'locked' by any process... either for reading, writing or both? Thanks... ------------------------------------------------------------ Never wear anything that panics the cat.
-
Hi, how can i check, given a file name, if the file has been 'locked' by any process... either for reading, writing or both? Thanks... ------------------------------------------------------------ Never wear anything that panics the cat.
Can you open the file exclusively?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi, how can i check, given a file name, if the file has been 'locked' by any process... either for reading, writing or both? Thanks... ------------------------------------------------------------ Never wear anything that panics the cat.
do you know how to open a file and lock it yourself ;P that might give you an idea!!!
Yours Truly, The One and Only!
-
Can you open the file exclusively?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Actually, I want to check whether a file is locked by *any process*, be it my own app or any other process... I'm aware of file locking functions when we open a file ourselves... but what about the files that are locked by some other app..?
-
do you know how to open a file and lock it yourself ;P that might give you an idea!!!
Yours Truly, The One and Only!
_NightOwl_ wrote:
do you know how to open a file and lock it yourself that might give you an idea!!! Yours Truly, The One and Only!
Actually, I want to check whether a file is locked by *any process*, be it my own app or any other process... I'm aware of file locking functions when we open a file ourselves... but what about the files that are locked by some other app..? ------------------------------------------------- No me, no life.. know me, know life..
-
Actually, I want to check whether a file is locked by *any process*, be it my own app or any other process... I'm aware of file locking functions when we open a file ourselves... but what about the files that are locked by some other app..?
Abhijeet Pathak wrote:
...but what about the files that are locked by some other app..?
If a file is open by another process, and your process tried to open the file exclusively, it would fail.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne