/** * main method * * @return void */ public function main() { if (!$this->file) { throw new BuildException('file must be set'); } if (!$this->user) { throw new BuildException('user must be set'); } if (strpos($this->user, '.')) { list($owner, $group) = explode('.', $this->user); } else { $owner = $this->user; } FileSystemManager::rchown($this->file, $owner); if (isset($group)) { FileSystemManager::rchgrp($this->file, $group); } if (isset($group)) { $this->log(sprintf('Recursively changed file owner on \'%s\' to %s.%s', $this->file, $owner, $group)); } else { $this->log(sprintf('Recursively changed file owner on \'%s\' to %s', $this->file, $owner)); } }