Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcel

Mono C# Examples


ASN.1
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
Facebook
Firebase
GeoOp
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Gzip
HTML-to-XML/Text
HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)

Jira
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
PayPal
Peoplevox
QuickBooks
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Shopify
Socket/SSL/TLS
Spider
Stream
Stripe
SugarCRM
Tar Archive
Twitter
VoiceBase
Walmart
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Xero
Zip
curl
eBay

 

 

 

(Mono C#) Iterate over Matching Filenames

Iterates over files within a .zip that match a pattern. In this case, the pattern is "*.pem". This example will open a .zip containing files of type .txt, .cer, .pem, and possibly others, and will iterate over only the .pem files.

Chilkat .NET Downloads

Chilkat .NET Assemblies

Chilkat for .NET Core

Chilkat for Mono

Chilkat.Zip zip = new Chilkat.Zip();

bool success;

//  Any string unlocks the component for the 1st 30-days.
success = zip.UnlockComponent("Anything for 30-day trial");
if (success != true) {
    Console.WriteLine(zip.LastErrorText);
    return;
}

//  Open a .zip containing PEM files, among other things..
success = zip.OpenZip("qa_data/certs/thawte-roots.zip");
if (success != true) {
    Console.WriteLine(zip.LastErrorText);
    return;
}

Chilkat.ZipEntry entry = zip.FirstMatchingEntry("*.pem");
Chilkat.ZipEntry nextEntry = null;
string pemStr;

while ((!(entry == null ))) {

    Console.WriteLine("Entry: " + entry.FileName);

    //  Get the uncommpressed contents of the entry:
    pemStr = entry.UnzipToString(0,"utf-8");
    Console.WriteLine(pemStr);

    //  The NextMatchingEntry method was added in v9.5.0.50
    nextEntry = entry.NextMatchingEntry("*.pem");

    entry = nextEntry;
}


 

© 2000-2016 Chilkat Software, Inc. All Rights Reserved.