AzureWebFarm.Services.SyncService.IsExcluded C# (CSharp) Method

IsExcluded() private method

private IsExcluded ( string topPath ) : bool
topPath string
return bool
        private bool IsExcluded(string topPath)
        {
            var position = topPath.IndexOf('/');

            if (position <= 0)
            {
                return false;
            }

            // Remove Site name
            var path = topPath.Substring(position + 1);
            if (_directoriesToExclude.Contains(path, StringComparer.OrdinalIgnoreCase))
            {
                return true;
            }

            return _directoriesToExclude.Any(toExclude => path.StartsWith(toExclude + "/"));
        }