Skip to content

PlainFile ​

php
final class Zairakai\LaravelDevTools\Services\PlainFile

Deletes a file with PHP alone.

The publication runs in projects without Laravel, where the File facade does not exist. Rector (Laravel set) turns every unlink() into File::delete(): this class is the one place that it is told to leave alone (rector.php).

Source: src/Services/PlainFile.php

Methods ​

delete() ​

php
public static function delete(string $file): void

deleteDirectory() ​

php
public static function deleteDirectory(string $directory): void

Deletes a folder and everything in it.

Documentation of 5.5.0 , built from 92a7387 on 5.5.0 by pipeline #3086393151 on 2026-11-18.