Helper\Unit::cleanFile PHP Method

cleanFile() public method

Removes a file from the system
Since: 2014-09-13
Author: Nikos Dimopoulos ([email protected])
public cleanFile ( string $path, string $fileName )
$path string
$fileName string
    public function cleanFile($path, $fileName)
    {
        $file = substr($path, -1, 1) != "/" ? $path . '/' : $path;
        $file .= $fileName;
        $actual = file_exists($file);
        if ($actual) {
            unlink($file);
        }
    }