iTools® introduce un primo driver nel settore della sicurezza informatica per monitorare lo stato del file System. Attraverso il driver “FileSystemMonitor” è possibile tenere traccia ed essere avvisati in caso di creazione, eliminazione, modifica o rinomina di file. Mediante le “Variable” iTools® è quindi possibile associare allarmi, segnalazioni o azioni personalizzate ad ogni evento di notifica che il driver genera al fine di riconoscere leggendo gli attributi associati al file o directory modificata le informazioni desiderate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
using System; using System.Collections.Generic; using System.Text; namespace TestFileSystemMonitorDriver { using IToolS.Components; using IToolS.Components.Communication; using IToolS.Components.IOServers; using IToolS.Data; class Program { static void Main(string[] args) { ComponentBase.RaiseEventsOnMainThread = false; IOServer ioServer = new IOServer(); Client client = new Client(); Group group = new Group(); Variable variable = new Variable(); ioServer.Name = "FileSystemMonitor"; ioServer.NetConfig.Address = @"C:\temp\test\"; client.IOServer = ioServer; client.Group = group; variable.Address = "Changed"; variable.Changed += variable_Changed; group.Add(variable); client.Start(); Console.WriteLine("Press ENTER to exit"); Console.ReadLine(); } static void variable_Changed(object sender, ChangedEventArgs e) { Console.WriteLine("Changed file: {0}", e.NewValue); } } } |