Drupal 7 introduced some rather important changes for files. First and foremost, they became entities, although they are not fully-fledged entities. This is most likely due to how different they are to content. For example, at the time of writing, file entities don't have any write support through wrappers. All changes must be done using the
entity object itself or the File API. The latter is the best option, as the File API is quite simple to use. The wrapper
save() method still works if you truly wish to bypass the File API.
In your applications, you will more often read values from file entities than you will write them. For reading, we should use wrappers or entity properties. The following table shows the wrapper and entity properties ...