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.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important