CC-5888: Handle file deletion if the file is stored in the cloud

This commit is contained in:
drigato 2014-08-12 12:32:49 -04:00
parent 46228341b2
commit 879e776c8d
4 changed files with 49 additions and 23 deletions

View file

@ -99,6 +99,12 @@ class CcFiles extends BaseCcFiles {
return is_file($this->getAbsoluteFilePath());
}
/**
*
* Deletes the file from the stor directory
*
* Returns the filesize of the deleted file
*/
public function deletePhysicalFile()
{
$filepath = $this->getAbsoluteFilePath();
@ -107,6 +113,8 @@ class CcFiles extends BaseCcFiles {
} else {
throw new Exception("Could not locate file ".$filepath);
}
return $this->getFileSize();
}
} // CcFiles