This makes binding menu items to a file reference image much simpler, as we do not have to bind to a property wrapper that resizes the image.
As a general rule, we always copy an image, before we change its size, so the image obtained from TMFileReference should always stay at its default size.
This is for places where we normally want to show a (live) image representing a URL (and its modified/SCM status) via bindings, but occasionally, we want to show a static image.
For example the location shown in the file browser. This is normally a folder, but it could be “Computer”. Similar for folder search results when searching unsaved documents.
The motivation is to have a universal type for a file that knows whether or not the file is open/modified, if it has SCM status, what icon to use for the file, and supporting bindings for the latter (incase icon is updated).
This does sound like a “document” but there are many places where we just want to show a file icon (with SCM and “modified” status) without instantiating a full document, for example folder pop-up menus.
We would also like a way to “close” the file, incase it is open, for example from file browser or “open quickly”, which is not really a document action per se, furthermore, we may delete the file from the file browser, which again, is more of a file than document action, but if the file is “open” somewhere, it should be notified about the delete operation.