Used by the sync task
public static create_from_path ( string $path ) : DNProject | ||
$path | string | |
return | DNProject |
/** * Sync the in-db project list with a list of file paths * @param array $paths Array of pathnames * @param boolean $dryRun */ public function syncWithPaths($paths, $dryRun = false) { foreach ($paths as $path) { if (!$this->filter('Name', $path)->count()) { $this->message($path); if (!$dryRun) { DNProject::create_from_path($path)->write(); } } } }