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.
Sign up for our free beginner training. Boost your credentials through advanced courses and certification. Register for Sitefinity training and certification.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important