All of the documentation and reference implementations I can find (e.g. Drupal's core tests) use vfsStream methods extensively to mock test fixtures.
But given that the whole point of this library is to mock a functional filesystem, shouldn't best practice be to use native filesystem methods when mocking fixtures? This decouples the choice of filesystem (real, vfs, or something else) from the business logic of fixture setup and is a heck of a lot more concise. For instance:
// Using vfsStream methods.
$root = vfsStream::setup();
vfsStream::newFile('acquia-pipelines.yml')
->at($root)
->withContent(file_get_contents('acquia-pipelines.yml'));
// Using native filesystem methods.
$root = vfsStream::setup();
copy('acquia-pipelines.yml', $root->url());
These seem functionally identical to me, except the latter is a lot more concise and easier to maintain. Is there any reason one should prefer using vfsStream methods?