public function export(StorageEntity $storage)
    {
        $output = sprintf($this->output, $storage->getId());
        $progress = sprintf($this->progress, $storage->getId());

        $this->fs->mkdir([dirname($output), dirname($progress)], 0755);
        $this->fs->remove([$output, $progress]);
        $this->fs->dumpFile($output, '');
        $this->fs->dumpFile($progress, '0%');

        $this->command->send(sprintf(
            'php app/console animedb:scan-storage --no-ansi --force --export=%s %s >%s 2>&1',
            $progress,
            $storage->getId(),
            $output
        ));
    }
public function export(StorageEntity $storage)
    {
        $output = sprintf($this->output, $storage->getId());
        $progress = sprintf($this->progress, $storage->getId());

        $this->fs->mkdir([dirname($output), dirname($progress)], 0755);
        $this->fs->remove([$output, $progress]);
        $this->fs->dumpFile($output, '');
        $this->fs->dumpFile($progress, '0%');

        $this->command->send(sprintf(
            'php app/console animedb:scan-storage --no-ansi --force --export=%s %s >%s 2>&1',
            $progress,
            $storage->getId(),
            $output
        ));
    }
public function export ( StorageEntity $ storage ) { $ output = sprintf ( $ this -> output , $ storage -> getId ( ) ) ; $ progress = sprintf ( $ this -> progress , $ storage -> getId ( ) ) ; $ this -> fs -> mkdir ( [ dirname ( $ output ) , dirname ( $ progress ) ] , 0755 ) ; $ this -> fs -> remove ( [ $ output , $ progress ] ) ; $ this -> fs -> dumpFile ( $ output , '' ) ; $ this -> fs -> dumpFile ( $ progress , '0%' ) ; $ this -> command -> send ( sprintf ( 'php app/console animedb:scan-storage --no-ansi --force --export=%s %s >%s 2>&1' , $ progress , $ storage -> getId ( ) , $ output ) ) ; }
Scan storage in background and export progress and output.

@param StorageEntity $storage
Scan storage in background and export progress and output .