Drupal investigation
You can find documentation in the wiki.
Also you might want to check vfsStream examples.