function Perforce::writeClientSpecToFile
Parameters
resource|false $spec:
1 call to Perforce::writeClientSpecToFile()
- Perforce::writeP4ClientSpec in vendor/
composer/ composer/ src/ Composer/ Util/ Perforce.php
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Perforce.php, line 366
Class
- Perforce
- @author Matt Whittom <Matt.Whittom@veteransunited.com>
Namespace
Composer\UtilCode
public function writeClientSpecToFile($spec) : void {
fwrite($spec, 'Client: ' . $this->getClient() . PHP_EOL . PHP_EOL);
fwrite($spec, 'Update: ' . date('Y/m/d H:i:s') . PHP_EOL . PHP_EOL);
fwrite($spec, 'Access: ' . date('Y/m/d H:i:s') . PHP_EOL);
fwrite($spec, 'Owner: ' . $this->getUser() . PHP_EOL . PHP_EOL);
fwrite($spec, 'Description:' . PHP_EOL);
fwrite($spec, ' Created by ' . $this->getUser() . ' from composer.' . PHP_EOL . PHP_EOL);
fwrite($spec, 'Root: ' . $this->getPath() . PHP_EOL . PHP_EOL);
fwrite($spec, 'Options: noallwrite noclobber nocompress unlocked modtime rmdir' . PHP_EOL . PHP_EOL);
fwrite($spec, 'SubmitOptions: revertunchanged' . PHP_EOL . PHP_EOL);
fwrite($spec, 'LineEnd: local' . PHP_EOL . PHP_EOL);
if ($this->isStream()) {
fwrite($spec, 'Stream:' . PHP_EOL);
fwrite($spec, ' ' . $this->getStreamWithoutLabel($this->p4Stream) . PHP_EOL);
}
else {
fwrite($spec, 'View: ' . $this->getStream() . '/... //' . $this->getClient() . '/... ' . PHP_EOL);
}
}