//$originalFileContent = file_get_contents($filename);
@unlink($normalizedRepoFilePath);
return 'Deleted ' . $filename;
});
}
public function newFileOrDirectory($cachePath, $repo, $branch, $repoFilename, $name, $email, $comment)
{
return $this->changeRepo($cachePath, $repo, $branch, $repoFilename, $name, $email, $comment, function ($client, $filename, &$outputs, $tempRepo, $normalizedRepoFilePath) use ($repoFilename, $repo, $branch, $name, $email, $comment) {
// array_unshift($outputs, $cachePath);
// array_unshift($outputs, $repoFilename);
/*
array_unshift($outputs, '$tempRepo: ' . $tempRepo);
array_unshift($outputs, '$repo: ' . $repo);
array_unshift($outputs, '$branch: ' . $branch);
array_unshift($outputs, '$repoFilename: ' . $repoFilename);
array_unshift($outputs, '$name: ' . $name);
array_unshift($outputs, '$email: ' . $email);
array_unshift($outputs, '$comment: ' . $comment);
array_unshift($outputs, '$filename: ' . $filename);
array_unshift($outputs, '$repoFilename: ' . $repoFilename);
$basePath = FileSystemPath::fromString($tempRepo);
$repoFilenameItem = FileSystemPath::fromString($repoFilename);
$normalizing = $basePath->resolve($repoFilenameItem);
array_unshift($outputs, '$normalizing: ' . $normalizing);
$normalized = FileSystemPath::fromString($normalizing)->normalize();
array_unshift($outputs, '$normalized: ' . $normalized);
array_unshift($outputs, '$normalizing type: ' . gettype($normalizing));
array_unshift($outputs, '$normalized type: ' . gettype($normalized));
$validPath = strpos($normalizing->__toString(), $normalized->__toString()) !== false;
array_unshift($outputs, 'includes current path in search: ' . ($validPath ? 'true' : 'false'));
return $repoFilename;
*/