PDA

View Full Version : How to know is file opened by other user(On local and on network)



ramazangirgin
9th May 2008, 14:42
Hi all,
I want to know is file opened by the other user.File may be in local disk or
on network(like microsoft network or samba shares). My program will be working on linux and windows.How can i do this?
Thanks in advance
Ramazan

wysota
9th May 2008, 15:49
In general you can't. There are some specific situations when this is possible - for instance when you use mandatory locking for files and try to open a locked file again - they this operation will fail and you'll know someone else has the lock. But you can forget it with remote file systems - it simply won't work.