commitMessage = "Updated asset ";
}
if (!ioService.exists(filePath)) {
throw new AssetNotFoundException();
}
CommentedOption commentedOption = new CommentedOption(getIdentity(), commitMessage);
if(((AbstractAsset)asset).acceptBytes()) {
ioService.write(filePath, ((Asset<byte[]>)asset).getAssetContent(), StandardOpenOption.TRUNCATE_EXISTING, commentedOption);
} else {
ioService.write(filePath, asset.getAssetContent().toString().getBytes(), StandardOpenOption.TRUNCATE_EXISTING, commentedOption);
}