How do I declare a Chef file resource whose contents depend on cookbook files?
===

I need a file `fileC` deployed that's the concatenation of two other files `fileA` and `fileB`.  In my current setup, all three files are in the cookbook, declared as Cookbook File resources.

But it feels redundant.  I'd like to declare the bigger file as a function of the two others.

When `fileC` was first needed, I got it to "almost work" by luck by declaring the file resource's contents as `IO.read(file1) + IO.read(file2)`.  But that fails as soon as the recipe is deployed to a new node, since `fileA` and `fileB` aren't present at compile time.

I tried to access the underlying Ruby objects' information on where the cookbook could be deployed.  But the more I looked, the less I was convinced it was possible with my level of Chef/Ruby knowledge.  The resource↔provider gap seems too wide.

I'd like to avoid the `cat fileA fileB >fileC` type of solution, for the following reason: in the future, I'll likely need to disciminate nodes that need C from nodes that need A/B.

Any ideas on how to address the redundancy?