I've registered with a task that fires, amongst other times, when a media node is deleted.
I'm using this task to delete the physical files from the harddrive. However, I'm doing this by using the standard System.IO methods in .net framework.
I would like to use Hive to do this as I understand Hive abstracts out the file system.
Could some one please give me a simple example on how I would use Hive to delete files and directories given a directory path.
Also, in the folder where the media folders are stored, there is another folder called "relations" that contains xml files that seem to link related images together (origonal file to it's thumbnail). I would like to clean out the relavant xml files from this folder when deleting the physical files. How should I go about that? Is there a Hive provider that takes care of that too?
Now back to that task. For anyone interested: The task I registered with is, TaskTriggers.Hive.PostAddOrUpdate.
That doesn't sound like the right task to register with. But it seems to fire when deleting nodes (media or content) and when a user logs in. Is that the way it should be? I was wanting to register with TaskTriggers.Hive.PostDelete, but that didn't exist. I'm using umbraco 5.0
Hive and the file system
Hello all
I've registered with a task that fires, amongst other times, when a media node is deleted.
I'm using this task to delete the physical files from the harddrive. However, I'm doing this by using the standard System.IO methods in .net framework.
I would like to use Hive to do this as I understand Hive abstracts out the file system.
Could some one please give me a simple example on how I would use Hive to delete files and directories given a directory path.
Also, in the folder where the media folders are stored, there is another folder called "relations" that contains xml files that seem to link related images together (origonal file to it's thumbnail). I would like to clean out the relavant xml files from this folder when deleting the physical files. How should I go about that? Is there a Hive provider that takes care of that too?
Now back to that task. For anyone interested: The task I registered with is, TaskTriggers.Hive.PostAddOrUpdate.
That doesn't sound like the right task to register with. But it seems to fire when deleting nodes (media or content) and when a user logs in. Is that the way it should be? I was wanting to register with TaskTriggers.Hive.PostDelete, but that didn't exist. I'm using umbraco 5.0
Thanks for any advice!
Dean
is working on a reply...