Appearance
ConfigBackup
php
final class Zairakai\LaravelDevTools\Services\ConfigBackupKeeps a copy of a file before a forced publication writes over it.
The copies of a run go in .dev-tools-backup/<UTC date and time>/, under their path from the root of the project (the same folder and layout as backup_file of the shell scripts). The folder is created by the first copy.
Source: src/Services/ConfigBackup.php
Constants
| Name | Value | Description |
|---|---|---|
FOLDER | '.dev-tools-backup' |
Methods
__construct()
php
public function __construct(string $root, string $timestamp = '')directoryUsed()
php
public function directoryUsed(): stringThe folder of the copies of this run, or null when nothing was saved.
save()
php
public function save(string $file): boolCopies the file, if it exists. A symbolic link is not copied.
Returns bool true when a copy was made