public static function remove($file_path = null, array &$logs = array())
    {
        if (is_null($file_path)) {
            return null;
        }
        if (file_exists($file_path)) {
            if (unlink($file_path)) {
                clearstatcache();
                return true;
            } else {
                $logs[] = sprintf('Can not unlink file "%s".', $file_path);
            }
        } else {
            $logs[] = sprintf('File path "%s" does not exist (can not be removed).', $file_path);
        }
        return false;
    }
public static function remove($file_path = null, array &$logs = array())
    {
        if (is_null($file_path)) {
            return null;
        }
        if (file_exists($file_path)) {
            if (unlink($file_path)) {
                clearstatcache();
                return true;
            } else {
                $logs[] = sprintf('Can not unlink file "%s".', $file_path);
            }
        } else {
            $logs[] = sprintf('File path "%s" does not exist (can not be removed).', $file_path);
        }
        return false;
    }
public static function remove ( $ file_path = null , array & $ logs = array ( ) ) { if ( is_null ( $ file_path ) ) { return null ; } if ( file_exists ( $ file_path ) ) { if ( unlink ( $ file_path ) ) { clearstatcache ( ) ; return true ; } else { $ logs [ ] = sprintf ( 'Can not unlink file "%s".' , $ file_path ) ; } } else { $ logs [ ] = sprintf ( 'File path "%s" does not exist (can not be removed).' , $ file_path ) ; } return false ; }
Remove a file if it exists

@param   string  $file_path
@param   array   $logs       Logs registry passed by reference
@return  bool
Remove a file if it exists