Skip to content

Commit d9e7a86

Browse files
authored
Merge pull request #1193 from Unity-Technologies/unity-master-unityaot-filesystemwatcher
Add default FileSystemWatcher support in unityaot profile (case 1066732)
2 parents f1f0587 + 173c688 commit d9e7a86

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

mcs/class/System/System.IO/FileSystemWatcher.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ void InitWatcher ()
123123
ok = DefaultWatcher.GetInstance (out watcher);
124124
//ok = WindowsWatcher.GetInstance (out watcher);
125125
break;
126+
#if !UNITY_AOT
126127
case 2: // libfam
127128
ok = FAMWatcher.GetInstance (out watcher, false);
128129
break;
@@ -135,6 +136,7 @@ void InitWatcher ()
135136
case 5: // inotify
136137
ok = InotifyWatcher.GetInstance (out watcher, true);
137138
break;
139+
#endif
138140
}
139141

140142
if (mode == 0 || !ok) {
@@ -173,8 +175,10 @@ internal string MangledFilter {
173175
return mangledFilter;
174176

175177
string filterLocal = "*.*";
178+
#if !UNITY_AOT
176179
if (!(watcher.GetType () == typeof (WindowsWatcher)))
177180
filterLocal = "*";
181+
#endif
178182

179183
return filterLocal;
180184
}
@@ -183,9 +187,11 @@ internal string MangledFilter {
183187
internal SearchPattern2 Pattern {
184188
get {
185189
if (pattern == null) {
190+
#if !UNITY_AOT
186191
if (watcher.GetType () == typeof (KeventWatcher))
187192
pattern = new SearchPattern2 (MangledFilter, true); //assume we want to ignore case (OS X)
188193
else
194+
#endif
189195
pattern = new SearchPattern2 (MangledFilter);
190196
}
191197
return pattern;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
System.IO/FileSystemWatcher_mobile.cs

mcs/class/System/unityaot_System.dll.sources

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@
44
../System.Web/System.Web.Util/HttpEncoder.cs
55
System.CodeDom/CodeCompileUnit.cs
66
System.CodeDom/CodeTypeDeclaration.cs
7+
8+
System.IO/DefaultWatcher.cs
9+
System.IO/FileAction.cs
10+
System.IO/FileSystemWatcher.cs
11+
System.IO/IFileWatcher.cs
12+
System.IO/NullFileWatcher.cs
13+
System.IO/SearchPattern.cs

0 commit comments

Comments
 (0)