4 using System.Collections.Generic;
5 using System.Threading;
7 namespace SiliconStudio.Core.IO
14 private const int SleepBetweenWatcherCheck = 200;
15 #if !SILICONSTUDIO_PLATFORM_WINDOWS_RUNTIME
16 private Thread watcherCheckThread;
18 private bool exitThread;
31 FileFilter = fileFilter ??
"*.*";
39 public string FileFilter {
get;
private set; }
47 #if !SILICONSTUDIO_PLATFORM_WINDOWS_RUNTIME
48 if (watcherCheckThread != null)
50 watcherCheckThread.Join();
51 watcherCheckThread = null;
63 return GetTrackedDirectoriesInternal();
86 UnTrackInternal(path);
96 var handler = Modified;
97 if (handler != null) handler(sender, e);
100 #if !SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP
103 private void InitializeInternal()
107 private void DisposeInternal()
111 private void TrackInternal(
string path)
115 private void UnTrackInternal(
string path)
119 private List<string> GetTrackedDirectoriesInternal()
121 return new List<string>();
EventHandler< FileEvent > Modified
Occurs when a file/directory change occured.
virtual void OnModified(object sender, FileEvent e)
Called when a file event occured.
DirectoryWatcher(string fileFilter=null)
Initializes a new instance of the DirectoryWatcher class.
void Track(string path)
Tracks the specified path.
virtual void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resourc...
Track file system events from several directories.
List< string > GetTrackedDirectories()
Gets a list of current directories being tracked.
void UnTrack(string path)
UnTracks the specified path.
Ä file event used notified by DirectoryWatcher