    # File lib/chef/cookbook_version.rb, line 586
        def segment_filenames(segment)
          unless COOKBOOK_SEGMENTS.include?(segment)
            raise ArgumentError, "invalid segment #{segment}: must be one of #{COOKBOOK_SEGMENTS.join(', ')}"
          end

          case segment.to_sym
          when :resources
            @resource_filenames
          when :providers
            @provider_filenames
          when :recipes
            @recipe_filenames
          when :libraries
            @library_filenames
          when :definitions
            @definition_filenames
          when :attributes
            @attribute_filenames
          when :files
            @file_filenames
          when :templates
            @template_filenames
          when :root_files
            @root_filenames
          end
        end