/// <summary>
        /// Download one file used to construc/build a package to a destination directory, example mypkg.tar.bz2 file.
        /// </summary>
        /// <param name="PkgName">Package name</param>
        /// <param name="FileName">File in the package to download.</param>
        /// <param name="Dest">Where to store the downloaded file, example "/home/user/tmp"</param>
        /// <param name="BlockSize">The size of each block during download, example 1024</param>
        /// <param name="TotalSize">The length of the file in Byte</param>
        /// <example> This sample shows how to call the GetBuildProjectPackageFile method.
        /// <code>
        /// using System;
        /// using MonoOBSFramework.Functions.BuildResults
        /// class TestClass
        /// {
        ///     static int Main()
        ///     {
        ///         BuildProjectPackageFile.GetBuildPkgResultFile("MonoOSC","MonoOSC-1.0.1.4.tar.bz2","/home/user/tmp",1024,600);
        ///     }
        /// }
        /// </code>
        /// </example>
        public static void GetBuildProjectPackageFile(string PkgName, string FileName, string Dest, int BlockSize, int TotalSize)
        {
            GETBIN DllFs = new GETBIN();

            DllFs.DownLoadFile("build/" + VarGlobal.PrefixUserName + "/" + PkgName + "/" + FileName, VarGlobal.User, VarGlobal.Password, Dest, BlockSize, TotalSize);
        }
Exemple #2
0
        //https://api.opensuse.org/source/home:surfzoid/Fedora_9/i586/MonoOSC/MonoOSC-1.0.0.0-2.2.i386.rpm
        /// <summary>
        /// Download one file build in a repo/package/arch , example MonoOSC-1.0.0.0-2.2.i386.rpm file.
        /// </summary>
        /// <param name="Repository">repository</param>
        /// <param name="Arch">Arch (i586, x86_64 ...)</param>
        /// <param name="PkgName">Package name</param>
        /// <param name="FileName">File in the package to download.</param>
        /// <param name="Dest">Where to store the downloaded file, example "/home/user/tmp"</param>
        /// <param name="BlockSize">The size of each block during download, example 1024</param>
        /// <param name="TotalSize">The length of the file in Byte</param>
        /// <example> This sample shows how to call the GetSourceProjectPackageFile method.
        /// <code>
        /// using System;
        /// using MonoOBSFramework.Functions.Sources
        /// class TestClass
        /// {
        ///     static int Main()
        ///     {
        ///         SourceProjectPackageFile.GetSourceProjectPackageFile("mono","i586","MonoOSC","MonoOSC-1.0.0.0-2.2.i386.rpm","/home/user/tmp",1024,600);
        ///     }
        /// }
        /// </code>
        /// </example>
        public static void GetSourceProjectPackageFile(string Repository, string Arch, string PkgName, string FileName, string Dest, int BlockSize, int TotalSize)
        {
            GETBIN DllFs = new GETBIN();

            DllFs.DownLoadFile("source/" + VarGlobal.PrefixUserName + "/" + Repository + "/" + Arch + "/" + PkgName + "/" + FileName, VarGlobal.User, VarGlobal.Password, Dest, BlockSize, TotalSize);
        }