blez
blez

Reputation: 5037

How to lock a file, so another application can't delete it?

Third-party application creates a file, which I read. After the full writing of the file, the app deletes it. How can I lock it so it can't be deleted?

Upvotes: 0

Views: 219

Answers (2)

Naszta
Naszta

Reputation: 7734

Check LockFile API function.

Upvotes: 1

Daniel Mošmondor
Daniel Mošmondor

Reputation: 19956

Keep it open and nobody will be able to delete it.

Upvotes: 3

Related Questions