PackageItem pkg = repo.loadPackage(bits[1]);
AssetItem asset;
if (pkg.containsAsset(a[0])) {
asset = pkg.loadAsset(a[0]);
if (asset.isArchived()) {
asset.archiveItem(false);
} else {
throw new RulesRepositoryException("The file " + path + " already exists, and was not archived.");
}
if (asset.isBinary()) {
asset.updateBinaryContentAttachment(in);