From d49af938df1dabbedd05614d03b1cf9904b623dc Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 3 Jul 2019 09:10:01 -0400 Subject: Used ROS IsWhiteSpace instead --- .../src/System/IO/FileSystemWatcher.cs | 24 +--------------------- 1 file changed, 1 insertion(+), 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 - /// - /// 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). - /// - private static bool IsEffectivelyEmpty(ReadOnlySpan path) - { - if (path.IsEmpty) - return true; - - foreach (char c in path) - { - if (c != ' ') - return false; - } - - return true; - } -#endif - /// /// Sees if the name given matches the name filter we have. /// private bool MatchPattern(ReadOnlySpan relativePath) { #if MONO - if (IsEffectivelyEmpty (relativePath)) + if (relativePath.IsWhiteSpace()) return false; #endif ReadOnlySpan name = IO.Path.GetFileName(relativePath); -- cgit v1.2.3