In the plugin interface, there are hooks for "deleted" and "changed" and the "changed" interfaces includes files which are either changed or added. Is there any way of telling that a file has been added rather than changed? With some plugins (for example, sidebar) if a new page (of a certain sort) is added, the only way one can fix up the dependencies is to rebuild the whole site from scratch. This is Not Good. Now, one could do something in the "changed" hook, but since one can't tell if a file has been changed or added, if one did something for every changed file, one would be doing a lot of needless work (so one might as well rebuild the site when one knows that a new (relevant) page has been added).

But I really would like to be able to do things just to the new files, so is there any way that one can distinguish the changed files from the added files?

-- KathrynAndersen

I think that presence dependencies mostly cover this case. But no, there is not currently a hook that gets information about which files changed vs were added. The information is available at the time the hooks are called so some new ones could be added.
Comment by joey Sun Jun 19 20:22:54 2011

If new hooks could be added, that would be greatly appreciated. Perhaps two new hooks: added and updated (the "updated" hook would be for files which were already-existing files which were changed).


Comment by kerravonsen [] Sun Jun 19 23:24:49 2011