One of the things that has changed when you are building V2 extensions for a cloud environment is that you cannot access most functions that work with physical files.
This presents a bit of a challenge when it comes to working with the media and media set field types, as the typical approach is to have an import and export function so that a user can get pictures in and out of the field.