示例#1
0
 /// <summary>
 /// Adds/Update common filelists to this share and saves them in directory specified
 /// Filelist included are:
 /// BZList, XmlBzList (UTF-8 and ASCII)
 /// </summary>
 /// <param name="share">Share you want to update/add filelist to</param>
 /// <param name="directory">Directory where you want to save filelists in</param>
 public static void AddCommonFilelistsToShare(Share share, string directory)
 {
     // Xml Utf-8 (Current DC++)
     FlowLib.Utils.FileLists.FilelistXmlBz2 xml = new FlowLib.Utils.FileLists.FilelistXmlBz2(share);
     xml.SystemPath = directory;
     xml.Encoding = System.Text.Encoding.UTF8;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // Xml Ascii (Early DC++)
     xml.Encoding = System.Text.Encoding.ASCII;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // Xml Utf-8 (Adc Standard list)
     xml.Bz2 = false;
     xml.SystemPath = directory;
     xml.Encoding = System.Text.Encoding.UTF8;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // BzList
     FlowLib.Utils.FileLists.FilelistMyList dclst = new FlowLib.Utils.FileLists.FilelistMyList(share);
     dclst.SystemPath = directory;
     dclst.CreateFilelist();
     share.RemoveFile(dclst.ContentInfo);
     share.AddFile(dclst.ContentInfo);
 }
示例#2
0
 /// <summary>
 /// Adds/Update common filelists to this share and saves them in directory specified
 /// Filelist included are:
 /// BZList, XmlBzList (UTF-8 and ASCII)
 /// </summary>
 /// <param name="share">Share you want to update/add filelist to</param>
 /// <param name="directory">Directory where you want to save filelists in</param>
 public static void AddCommonFilelistsToShare(IShare share, string directory)
 {
     // Xml Utf-8 (Current DC++)
     FlowLib.Utils.FileLists.FilelistXmlBz2 xml = new FlowLib.Utils.FileLists.FilelistXmlBz2(share);
     xml.SystemPath = directory;
     xml.Encoding   = System.Text.Encoding.UTF8;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // Xml Ascii (Early DC++)
     xml.Encoding = System.Text.Encoding.ASCII;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // Xml Utf-8 (Adc Standard list)
     xml.Bz2        = false;
     xml.SystemPath = directory;
     xml.Encoding   = System.Text.Encoding.UTF8;
     xml.CreateFilelist();
     share.RemoveFile(xml.ContentInfo);
     share.AddFile(xml.ContentInfo);
     // BzList
     FlowLib.Utils.FileLists.FilelistMyList dclst = new FlowLib.Utils.FileLists.FilelistMyList(share);
     dclst.SystemPath = directory;
     dclst.CreateFilelist();
     share.RemoveFile(dclst.ContentInfo);
     share.AddFile(dclst.ContentInfo);
 }