original_string: protected static function _secureDelete($file)
      {
          if (isset($ptr['secure'][$file])) {
              $filesize = filesize($file);
              $fp = fopen($file, 'r+');
              foreach (self::$patterns as $pattern) {
                  $pattern = substr(str_repeat($pattern, floor($filesize / strlen($pattern)) + 1), 0, $filesize);
                  fwrite($fp, $pattern);
                  fseek($fp, 0);
              }
              fclose($fp);
          }
  
          @unlink($file);
      }
code: protected static function _secureDelete($file)
      {
          if (isset($ptr['secure'][$file])) {
              $filesize = filesize($file);
              $fp = fopen($file, 'r+');
              foreach (self::$patterns as $pattern) {
                  $pattern = substr(str_repeat($pattern, floor($filesize / strlen($pattern)) + 1), 0, $filesize);
                  fwrite($fp, $pattern);
                  fseek($fp, 0);
              }
              fclose($fp);
          }
  
          @unlink($file);
      }
code_tokens: protected static function _secureDelete ( $ file ) { if ( isset ( $ ptr [ 'secure' ] [ $ file ] ) ) { $ filesize = filesize ( $ file ) ; $ fp = fopen ( $ file , 'r+' ) ; foreach ( self :: $ patterns as $ pattern ) { $ pattern = substr ( str_repeat ( $ pattern , floor ( $ filesize / strlen ( $ pattern ) ) + 1 ) , 0 , $ filesize ) ; fwrite ( $ fp , $ pattern ) ; fseek ( $ fp , 0 ) ; } fclose ( $ fp ) ; } @ unlink ( $ file ) ; }
docstring: Securely delete the file by overwriting the data with a random
  string.
  
  @param string $file  Filename.
docstring_tokens: Securely delete the file by overwriting the data with a random string .