The problem with implementing FileIsDeletableByCurrentUser is that it’s not possible to do so. The reason is the file system is a constantly changing item.
In between any check you make to the file system and the next operation any number of events can and will happen. Including …
- Permissions on the file could change
- The file could be deleted
- The file could be locked by another user / process
- The USB key the file is on could be removed
The best function you could write would most aptly be named FileWasDeletableByCurrentUser.