lib/MwbExporter/Storage/Storage.php
public function getFile($filename)
    {
        $filename = $this->outDir.DIRECTORY_SEPARATOR.$filename;
        $this->mkdir(dirname($filename));
        if (is_file($filename) && $this->backup) {
            @rename($filename, sprintf('%s.bak', $filename));
        }

        return $filename;
    }
public function getFile($filename)
    {
        $filename = $this->outDir.DIRECTORY_SEPARATOR.$filename;
        $this->mkdir(dirname($filename));
        if (is_file($filename) && $this->backup) {
            @rename($filename, sprintf('%s.bak', $filename));
        }

        return $filename;
    }
public function getFile ( $ filename ) { $ filename = $ this -> outDir . DIRECTORY_SEPARATOR . $ filename ; $ this -> mkdir ( dirname ( $ filename ) ) ; if ( is_file ( $ filename ) && $ this -> backup ) { @ rename ( $ filename , sprintf ( '%s.bak' , $ filename ) ) ; } return $ filename ; }
Check file if already exist and do backup if necessary.

@param string $filename  The file name
@return string
Check file if already exist and do backup if necessary .