Add file_get_type API function
Rename some API parameters to match the common naming scheme
A list cannot contain itself as an item

This would create a recursion in the locking when a list locks its items.
Improve some log messages
Add object-is-locked error code