diff options
author | Steve Pfister <steve.pfister@microsoft.com> | 2019-07-03 16:10:01 +0300 |
---|---|---|
committer | Steve Pfister <steve.pfister@microsoft.com> | 2019-07-03 16:10:01 +0300 |
commit | d49af938df1dabbedd05614d03b1cf9904b623dc (patch) | |
tree | 24c543ab15e246c7edfbf354b2602641ea9c283f | |
parent | ee6bf0c4ec3acd7d7852758091a8b8e3b651c56a (diff) |
Used ROS IsWhiteSpace instead
-rw-r--r-- | src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs b/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs index a10cbf67aa..e7affc5201 100644 --- a/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs +++ b/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs @@ -391,35 +391,13 @@ namespace System.IO throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, path), nameof(path)); } -#if MONO - /// <summary> - /// Returns true if the path is effectively empty for the current OS. - /// This function is borrowed from PathInternal.Windows because Mono - /// on the desktop still needs to support the netfx behavior. - /// EffectivelyEmpty means an empty span, null, or just spaces ((char)32). - /// </summary> - private static bool IsEffectivelyEmpty(ReadOnlySpan<char> path) - { - if (path.IsEmpty) - return true; - - foreach (char c in path) - { - if (c != ' ') - return false; - } - - return true; - } -#endif - /// <summary> /// Sees if the name given matches the name filter we have. /// </summary> private bool MatchPattern(ReadOnlySpan<char> relativePath) { #if MONO - if (IsEffectivelyEmpty (relativePath)) + if (relativePath.IsWhiteSpace()) return false; #endif ReadOnlySpan<char> name = IO.Path.GetFileName(relativePath); |