App\Services\Filesystem\LaravelFilesystem::delete PHP Method

delete() public method

Delete a file.
public delete ( string $path ) : boolean
$path string File path
return boolean
    public function delete($path)
    {
        return $this->fs->delete($path);
    }

Usage Example

 public function test_Should_DeleteFile()
 {
     $file = vfsStream::newFile('file')->at($this->rootDir);
     $fs = new LaravelFilesystem($this->app['files']);
     $fs->delete(vfsStream::url('rootDir/file'));
     $this->assertFileNotExists(vfsStream::url('rootDir/file'));
 }