protected function deleteParseFile(){

        if (Yii::$app->session->hasFlash('file_name')) {
            $file_path = Yii::$app->session->getFlash('file_name');
            if(file_exists($file_path))
                unlink($file_path);
        }
    }
protected function deleteParseFile(){

        if (Yii::$app->session->hasFlash('file_name')) {
            $file_path = Yii::$app->session->getFlash('file_name');
            if(file_exists($file_path))
                unlink($file_path);
        }
    }
protected function deleteParseFile ( ) { if ( Yii :: $ app -> session -> hasFlash ( 'file_name' ) ) { $ file_path = Yii :: $ app -> session -> getFlash ( 'file_name' ) ; if ( file_exists ( $ file_path ) ) unlink ( $ file_path ) ; } }
if in current session file was already has read - clear session flash and delete the file
if in current session file was already has read - clear session flash and delete the file