Your solution is simple and you can do it manually in PSPad immediately. In program settings set option R/O mode changes file attribute.
But there is same problem as for all locking mechanism: Imagine there is several people who access to file from different locations. One of them starts edit file and his connection will be interrupted. Case 1: he connect again after while, but file is marked as R/O. Is it his old mark or somebody else start edit it already? Case 2: he can't connect and file stays locked for all, cause they don't know if he still edits or not. The solution must be more sophisticated. Concept I have in head for it: 1. when you open file, new file with same name and extension is created + e.g. lck extension is added. This file will contains name of user who lock it. Time when the file was locked can be taken from file time. 2. This time will be updated every time the file is saved. 3. This file will be removed when user close file If his connection will be interrupted and he will connect again, he can open file again, cause lock file contains same name - PSPad knows that nobody else start edit it. If his connection can't be restored, there can be some timeout (user can set it) how long can be file locked. If there is no release after timeout (e.g.1 hour), user can edit this file. Advantages of this solution: PSPad will show information who is working with this file This solution can be applied over FTP connection too -- <http://forum.pspad.com/read.php?2,46275,62485> PSPad freeware editor http://www.pspad.com
