/var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/me-tools/src/Command
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/me-tools/src/Command/Command.php (2592B)
verbose(__d('me_tools', 'File or directory `{0}` already exists', rtr($path)));
return true;
}
/**
* Copies a file
* @param \Cake\Console\ConsoleIo $io The console io
* @param string $source Source file
* @param string $dest Destination file
* @return bool
* @throws \ErrorException
*/
public function copyFile(ConsoleIo $io, string $source, string $dest): bool
{
if ($this->verboseIfFileExists($io, $dest)) {
return false;
}
try {
//Checks if the source is readable and the destination is writable
Exceptionist::isReadable($source);
Exceptionist::isWritable(dirname($dest));
Filesystem::instance()->copy($source, $dest);
} catch (Exception $e) {
$io->error($e->getMessage());
return false;
}
$io->verbose(__d('me_tools', 'File `{0}` has been copied', rtr($dest)));
return true;
}
/**
* Checks if the console is verbose
* @param \Cake\Console\ConsoleIo $io The console io
* @return bool
* @since 2.24.1
*/
public function isVerbose(ConsoleIo $io): bool
{
return $io->level() === $io::VERBOSE;
}
}