Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a file

Status
Not open for further replies.

CCortez

Programmer
Sep 18, 2000
16
0
0
BR
Hi,
I want to open a text file using fopen as the following:
if the file to be open named "file1.txt" is being used for another application (it is already opened or truncated), then I'd like to open another file named "file2.txt", to update it with fwrite function.
How to detect if the file1.txt is already opened or being used?
Please somebody may help me?
Cortez
 
I tried to find an answer to your question at prior times in my life, but found none...

It seems that there is no way to do it... At least, no common way.

In Unix, you would probably inspect the INODES table, but I don't know how you would get access to that...

I Windows might be even tougher... [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top