Doing filesystem tasks in Laravel

Code
<?php

use Illuminate\Filesystem\Filesystem;

$rootDir __DIR__;
$dir $rootDir '/fs';

$fs = new Filesystem();

$fs->makeDirectory($dir0775);
echo 
'Directory fs created' PHP_EOL PHP_EOL;

$target $dir '/config.yml';

$fs->copy(
    
$rootDir '/files/text/config.yml',
    
$target
);

echo 
$fs->get($target) . PHP_EOL PHP_EOL;

$fs->append($target,  PHP_EOL 'append');
$fs->prepend($target'prepend' PHP_EOL);

echo 
$fs->get($target) . PHP_EOL;
Result
Directory fs created

db.username: test, db.password: pass

prepend
db.username: test, db.password: pass
append
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6