Someone has created a tracker feature request which is well thought out and may be worth building on/voting up.
General developer forum
File locking / prevent deletion by user
This discussion has been locked so you can no longer reply to it.