To subscribe to the Created event, in the constructor of the CustomTypeSiteSyncSnapIn class, add the App_Data\Sitefinity\Test path that will be watched by the watcher and subscribe to the Created event.
RESULT: Every time you create a new folder or file inside the Test folder, a log entry for the created item is logged in the database.
NOTE: Immediately after you create a new folder or file, the event is raised. It gets the first (default) name of the item. Therefore, if you want to change the default name of the item, you must implement an event handler for the Renamed event of the FileSystemWatcher class.
NOTE: You can choose how you want to export the items – all items in one transaction, or a separate transaction for each entry.
Back To Top