fCraft.InfoCommands.GetRuleSectionList C# (CSharp) Method

GetRuleSectionList() private method

private GetRuleSectionList ( ) : IEnumerable
return IEnumerable
        private static IEnumerable<string> GetRuleSectionList()
        {
            if ( Directory.Exists( Paths.RulesPath ) ) {
                string[] sections = Directory.GetFiles( Paths.RulesPath, "*.txt", SearchOption.TopDirectoryOnly )
                                             .Select( name => Path.GetFileNameWithoutExtension( name ) )
                                             .Where( name => !String.IsNullOrEmpty( name ) )
                                             .ToArray();
                if ( sections.Length != 0 ) {
                    return sections;
                }
            }
            return null;
        }