Explorer has always shown a zip as a folder you can open. GPALFile does the same. Put the archive in the path where a folder would go and name what you want inside it, with or without a wildcard.
The files are taken out when WithFileName runs, the same moment a wildcard is expanded or a url is fetched, so everything that takes a GPALFile gets plain files on disk. None of it knows an archive was involved.
The archive is recognized by its contents, so it does not matter what it is called. An .xpi, a .jar, an .xlsx and a download saved with no extension all open, and a .tar.gz opens as the tar inside it.
// download, unpack, convert
browser
GPALFile orders = (GPALFile)GPAL
GPAL
What comes out of an archive lands in the GPAL temp directory, in a folder named after the archive with .contents on the end and a short code that keeps two archives of the same name apart. Only the files the path asked for are written. Like everything in the temp directory they are safe to delete, so copy out anything worth keeping.
SaveTo makes an archive, and the destination's extension decides what kind, the same way the converter's SaveTo decides between json and csv. Names follow copy's rule. A name is one target, so reports.zip holds everything. A wildcard keeps each file's own name, so *.gz makes a.csv.gz and b.csv.gz. Leave the folder off and the archive goes beside the source.
A folder goes in whole, subfolders and all, with its contents at the top of the archive. That is what an extension package needs, with manifest.json at the root, and what a backup of a project folder wants. Saving a folder into itself is fine: the archive being written, and the ones earlier runs numbered from it, are left out.
// a project folder, packed whole
((GPALFile)GPAL
// the logs, compressed in place under their own names
((GPALFile)GPAL
// one zip of the reports, then the originals removed
((GPALFile)GPAL
WithOverwriteFile(true) replaces an archive already there. Without it the new archive takes the next free name, reports_0001.zip, the way .Next and CopyTo do, and every archive written is listed in ReturnFilenames. A compressed file keeps its inner extension when it is numbered, so the next reports.csv.gz is reports_0001.csv.gz and still unpacks to a .csv.
A url goes through an archive the same way a path does, as long as a wildcard follows it: https://example.com/export.zip/*.csv fetches the zip, then opens it. Without a wildcard the url is fetched as it stands, because plenty of real download links have .zip/ in the middle of them.
zip, 7z, rar and tar open, and so does a tar inside a gz, bz2 or xz. A gz, bz2 or xz holding a single file opens as a folder of one, named without the extension. SaveTo writes zip, gz, tar and tar.gz; 7z and rar open but are not written.
The zipExtensions and gzExtensions lists in GPAL.yaml say which other names SaveTo writes as a zip or a gz. They start with xpi, jar, vsix and nupkg for zip, and gzip and svgz for gz.
// fetched, then opened: every
GPALFile logs = (GPALFile)GPAL
foreach (string log in logs
{
// an ordinary file on disk
}
A gz is a single file compressed, not a folder. Several files saved to one named .gz are numbered reports.csv.gz, reports_0001.csv.gz and on, and a folder cannot be saved to a .gz at all. For more than one file, use .zip or .tar.gz.
Showing off some plain text in these paragraphs eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Here you can find different accents and emphasis sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
This is a link and how it could look like bestlinkinthebeautifulworld. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Here's just some classic bold text adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam notBoldSecondbestlinkinthebeautifulworld illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at adipisicing elit libero vel voluptas? Expedita, adipisicing facere dolores voluptatem ad ab rem assumenda soluta!
Other cuple of colors in case we want to emphasize several ways adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at voluptatem libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae quas consequuntur illo numquam assumenda autem exercitationem distinctio perspiciatis in natus. Eius dicta similique ipsam ipsa minima, nemo quae enim tempore.
GPAL
.CallIfNotFound(GenericCallIfNotFound)
.WithPublishToConsole();
//System.Drawing.Rectangle windowSize = new System.Drawing.Rectangle(10, 10, 1500, 1024);
// NOTE: we have to set browser = before we execute any steps
// this is due to the 'GenericCallIfNotFound' which might throw an exception, and BankScraper will not have the browser set when it calls scraper.Close()
// until the complete fluent line gets executed (meaning every step, meaning browser is not set until everything else succeeds)
browser = GPAL.Browser
.WithBrowserType(Enums.BrowserType.Chrome)
.WithProfileDataDirectory(ChromeProfileLocation)
.WithUseAutomationEngine(AutomationEngine.Selenium)
.WithWindowSize(new System.Drawing.Rectangle(0,0,1920,1080))
.ToGPALObject();