Ejemplo n.º 1
0
 public static IEnumerable <string> OptionsToString(this UnzipFlags value, OptionPreference preferLongNames = OptionPreference.Short)
 {
     // generator : SingleTaskEnumsGenerator
     // -o: Overwrite existing files without prompting.
     if ((value & UnzipFlags.Overwrite) != 0)
     {
         yield return("-o");
     }
 }
Ejemplo n.º 2
0
 public static UnzipFlags SetOrClear(this UnzipFlags current, UnzipFlags value, bool add)
 {
     if (add)
     {
         return(current | value);
     }
     else
     {
         return(current & ~value);
     }
 }
Ejemplo n.º 3
0
        private void SchedUnzip(string id, string zipFile, string targetFolder, UnzipFlags flags)
        {
            zipFile = Path.GetFullPath(zipFile);
            UnzipCatalog ctlg = new UnzipCatalog()
            {
                Id           = id,
                TargetFolder = targetFolder,
                ZipFile      = zipFile,
                Flags        = flags,
            };

            catalogs_.Add(ctlg);
        }