---
title: "lint/laravel/prefer-file-facade-delete"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/laravel/prefer-file-facade-delete" />

In the [`code-quality`](/docs/rules/sets/code-quality) set. Unsafe fix: it can change behaviour. Runs when laravel is installed. **Planned: not in Pun yet.** Enabling it is a config error.

## What it does

Use the File facade instead of the unlink() function.

## Replaces

- [`UnlinkFuncCallToFileFacadeDelete`](https://getrector.com/rule-detail/unlink-func-call-to-file-facade-delete-rector) (rector-laravel)

[More lint/laravel rules](/docs/rules/lint/laravel) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
