[DOCS][Developer] Update storage documentation

This commit is contained in:
2021-08-17 21:47:08 +01:00
committed by Hugo Sales
parent 78f4ccb576
commit 5c8677304c
3 changed files with 40 additions and 21 deletions

View File

@@ -200,6 +200,11 @@ class Attachment extends Entity
const FILEHASH_ALGO = 'sha256';
/**
* Delete a file if safe, removes dependencies, cleanups and flushes
*
* @return bool
*/
public function kill(): bool
{
if ($this->livesDecrementAndGet() <= 0) {
@@ -209,7 +214,7 @@ class Attachment extends Entity
}
/**
* Attachment delete always removes dependencies, cleanups and flushes
* Remove the respective file from disk
*/
public function deleteStorage(): bool
{
@@ -235,7 +240,7 @@ class Attachment extends Entity
/**
* Attachment delete always removes dependencies, cleanups and flushes
*/
public function delete(): bool
protected function delete(): bool
{
if ($this->getLives() > 0) {
Log::warning("Deleting file {$this->getId()} with {$this->getLives()} lives. Why are you killing it so young?");