I need to make sure that two directory trees are identical in terms of structure, but in name only (ie, list of filenames is identical, but the files in "mirrored" dir will be variations on the theme of the files in the "master" directory).
Is this just a simple File::Find thing with two calls to find() where I would push each $File::Find::name value onto the corresonding array, and then a simple equality test at the end?
At first all I care about is just getting notified if the mirror is off. Then I'd like to build up to outputting a list of the differences, then to actually fixing the differences (rsync-style).
There's a twist though; there is one subdirectory in the "master" tree that we will likely NOT want mirrored over. I imagine I could take care of that with a conditional in the &wanted sub, but what do you think? Maybe add it as an argument to the program in case the list of non-mirrored dirs grows? I don't know how likely that is.
Let me know if code/pseudocode would help, and if the general premise isn't as clear as I intended.
Terrence
_________________________________________________________________________________
I like computer programming because it's like Legos for the mind.
In reply to How to ensure duplicate directory and file tree, but not file contents themselves? by OfficeLinebacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |