src/Shell/BasicSeedShell.php
protected function existsOrCreate($file) {
		if (!file_exists($file)) {
			$this->out('<info>Creating empty seed file: ' . $this->shortPath($file) . '</info>');

			file_put_contents($file, <<<'EOD'
<?php
/**
 * BasicSeed plugin data seed file.
 */

namespace App\Config\BasicSeed;

use Cake\ORM\TableRegistry;

// Write your data import statements here.
$data = [
	'TableName' => [
		//'_truncate' => true,
		//'_entityOptions' => [
		//	'validate' => false,
		//],
		//'_saveOptions' => [
		//	'checkRules' => false,
		//],
		'_defaults' => [],
		[
			'id' => 1,
			'name' => 'record 1',
		],
	],
];

$this->importTables($data);

EOD
			);
		}
	}
protected function existsOrCreate($file) {
		if (!file_exists($file)) {
			$this->out('<info>Creating empty seed file: ' . $this->shortPath($file) . '</info>');

			file_put_contents($file, <<<'EOD'
<?php
/**
 * BasicSeed plugin data seed file.
 */

namespace App\Config\BasicSeed;

use Cake\ORM\TableRegistry;

// Write your data import statements here.
$data = [
	'TableName' => [
		//'_truncate' => true,
		//'_entityOptions' => [
		//	'validate' => false,
		//],
		//'_saveOptions' => [
		//	'checkRules' => false,
		//],
		'_defaults' => [],
		[
			'id' => 1,
			'name' => 'record 1',
		],
	],
];

$this->importTables($data);

EOD
			);
		}
	}
Generates a new, empty seed file if one does not already exist.

This is called during initialize to ensure that the file is
_always_ available for reading.

@TODO: Convert this into a proper bake template.

@param string $file The full filesystem path to check/create.
@return void