
Sub fw_CreationDetected(FileName As String)

Log("creation time: " & fw.GetCreationTime("C:\Test\test.txt")) 'Log the new creation time of file Log("creation time: " & fw.GetCreationTime("C:\Test\test.txt")) 'Log creation time of a fileįw.SetCreationTime("C:\Test\test.txt", DateTime.Now) 'Set the creation time to now T.Initialize("t", 60*1000) 'Stop file watching in 1 minuteįw.Initialize("fw") 'Initialize with the event nameįw.SetWatchList(Array as String(File.DirApp)) 'Set the current dir to be watched The watching is performed off the main thread however events are raised on the main thread.

This might introduce a latency in receiving file change events and might consume more resources, though I haven't tested it on any such systems. On systems that don't have native file events, the library will poll the file system for changes, periodically. On Windows, this library performs quite well, using the system's native file events and consuming only a minuscule amount of system resources. Beware, some operating systems won't support all of those attributes. Additionally, this library enables you to get and set last access time, last modified time, creation time, read-only state and hiddenness of files. It allows you to set certain directories to be watched, raising events when files or folders within those directories are created, deleted or modified. This library wraps many capabilities from the package and a few from the java.io.File package.
