public function create($last = false)
    {
        if (!file_exists($this->destination)) {
            $dir = dirname($this->destination);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }

            if (@file_put_contents($this->destination, $this->generateFileContents()) > 0) {
                $this->command->output->writeLn($this->command->tree($last) . $this->command->ok($this->destination));
            } else {
                $this->command->output->writeLn($this->command->tree($last) . $this->command->fail($this->destination));
            }

        } else {
            $this->command->output->writeLn($this->command->tree($last) . $this->command->skip($this->destination));
        }
    }
public function create($last = false)
    {
        if (!file_exists($this->destination)) {
            $dir = dirname($this->destination);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }

            if (@file_put_contents($this->destination, $this->generateFileContents()) > 0) {
                $this->command->output->writeLn($this->command->tree($last) . $this->command->ok($this->destination));
            } else {
                $this->command->output->writeLn($this->command->tree($last) . $this->command->fail($this->destination));
            }

        } else {
            $this->command->output->writeLn($this->command->tree($last) . $this->command->skip($this->destination));
        }
    }
public function create ( $ last = false ) { if ( ! file_exists ( $ this -> destination ) ) { $ dir = dirname ( $ this -> destination ) ; if ( ! is_dir ( $ dir ) ) { mkdir ( $ dir , 0755 , true ) ; } if ( @ file_put_contents ( $ this -> destination , $ this -> generateFileContents ( ) ) > 0 ) { $ this -> command -> output -> writeLn ( $ this -> command -> tree ( $ last ) . $ this -> command -> ok ( $ this -> destination ) ) ; } else { $ this -> command -> output -> writeLn ( $ this -> command -> tree ( $ last ) . $ this -> command -> fail ( $ this -> destination ) ) ; } } else { $ this -> command -> output -> writeLn ( $ this -> command -> tree ( $ last ) . $ this -> command -> skip ( $ this -> destination ) ) ; } }
Generates and writes a file in the file system
@param  boolean $last        Specifies if this is the last file in a queue
Generates and writes a file in the file system