예제 #1
0
 static void DumpGT2Toc(string[] args)
 {
     if (!File.Exists(args[1]))
     {
         Console.Error.WriteLine("VOL file '{0}' doesn't exist!", args[1]);
         return;
     }
     using (VolFile theVol = new VolFile(args[1]))
     {
         if (!theVol.CheckAndCacheHeaderDetails())
         {
             Console.WriteLine("File is not a GT2.vol (incorrect GTFS signature, not enough entries, or total entries less than files)");
             return;
         }
         theVol.ParseToc(new VolFile.TocFileNotify(EmbeddedFileNotify));
     }
 }
예제 #2
0
        static void ExplodeVol(string[] args)
        {
            bool decompGZ = (args.Length >= 4);

            if (!File.Exists(args[1]))
            {
                Console.Error.WriteLine("VOL file '{0}' doesn't exist!", args[1]);
                return;
            }
            using (VolFile theVol = new VolFile(args[1]))
            {
                if (!theVol.CheckAndCacheHeaderDetails())
                {
                    Console.WriteLine("File is not a GT2.vol (incorrect GTFS signature, not enough entries, or total entries less than files)");
                    return;
                }
                theVol.ParseToc(new VolFile.TocFileNotify(EmbeddedFileNotify));
                theVol.Explode(args[2], decompGZ, new VolFile.ExplodeProgressCallback(WriteToConsole));
            }
        }