/// <summary>
        /// Jsonifies the parsed content of local and archived files.
        /// </summary>
        /// <param name="searchPattern"></param>
        /// <returns></returns>
        public IEnumerable <string> Jsonify(string searchPattern = "*")
        {
            Serializer.Serializer serializer = new Serializer.Serializer(Options.SerializerOptions);
            var items = EnumerateDirectory(searchPattern).Concat(EnumerateArchives(searchPattern));

            return(serializer.Serialize(items));
        }
        /// <summary>
        /// Exports the jsonified parsed content of the provided files.
        /// <para>This runs as a background task.</para>
        /// </summary>
        /// <param name="formats"></param>
        /// <returns></returns>
        public CancellationTokenSource Export(IEnumerable <IFormat> formats)
        {
            var cts = new CancellationTokenSource();

            Task.Run(() =>
            {
                Serializer.Serializer serializer = new Serializer.Serializer(Options.SerializerOptions);
                serializer.Export(formats);
            }, cts.Token);

            return(cts);
        }
        /// <summary>
        /// Exports the jsonified parsed content of local and archived files.
        /// <para>This runs as a background task.</para>
        /// </summary>
        /// <param name="searchPattern"></param>
        /// <returns></returns>
        public CancellationTokenSource Export(string searchPattern = "*")
        {
            var cts = new CancellationTokenSource();

            Task.Run(() =>
            {
                Serializer.Serializer serializer = new Serializer.Serializer(Options.SerializerOptions);
                var files = EnumerateDirectory(searchPattern).Concat(EnumerateArchives(searchPattern));
                serializer.Export(files);
            }, cts.Token);

            return(cts);
        }
 /// <summary>
 /// Jsonifies the parsed content of the provided files.
 /// </summary>
 /// <param name="formats"></param>
 /// <returns></returns>
 public IEnumerable <string> Jsonify(IEnumerable <IFormat> formats)
 {
     Serializer.Serializer serializer = new Serializer.Serializer(Options.SerializerOptions);
     return(serializer.Serialize(formats));
 }