too long

I am running my Laravel Project on centos, using the default artisan server. I am trying to add data to files, using laravel File::append command. In config/filesystems.php i have the following:

    'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('data'),
    ],

and

    /*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/

'default' => env('FILESYSTEM_DRIVER', 'local'),

and 'FILESYSTEM_DRIVER' is not defined in the .env file. However when i use File::append(), the files are created in the public folder, and not storage_path

Any idea what is causing this?What am i missing.

While Storage::put('filename.jpg', $contents); uses the default filesystem and thus expects a relative filename, File::append does not.

So a possible solution here could be File::append($path, 'yourAppend'); with the full path to your file in the storage folder.