1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00

delete static demo when changing demo url

This commit is contained in:
Robin Appelman 2017-08-08 13:00:19 +02:00
commit 611e7c3415
5 changed files with 138 additions and 21 deletions

View file

@ -39,4 +39,10 @@ class DemoStore {
private function getUrl(string $name): string {
return 'https://' . $this->webRoot . $this->getPrefix($name) . $name;
}
public function remove(Demo $demo) {
if (file_exists($demo->getPath())) {
unlink($demo->getPath());
}
}
}