This is an example for basic interactions with Moodle 2.x File Manager.
I wrote it years ago to help myself learn, and shared it with anyone. Over the years, many people have found this as a resource. So, as I'm currently employed to work in Moodle, I'll keep this thing updated.