aboutsummaryrefslogtreecommitdiff
path: root/Zip/Archive.html
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-10 21:04:41 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-10 21:04:41 -0400
commit25199ab4c29057d7c0a73812fc8f2ac3605c1d86 (patch)
tree78f93a21b23da48b8cd0113e8262876426cfa7e6 /Zip/Archive.html
parent533ee3ceb098919da478a6be57a2f4342712aca5 (diff)
downloadzip-crystal-25199ab4c29057d7c0a73812fc8f2ac3605c1d86.tar.bz2
zip-crystal-25199ab4c29057d7c0a73812fc8f2ac3605c1d86.zip
add documentation
Diffstat (limited to 'Zip/Archive.html')
-rw-r--r--Zip/Archive.html472
1 files changed, 472 insertions, 0 deletions
diff --git a/Zip/Archive.html b/Zip/Archive.html
new file mode 100644
index 0000000..ea6e914
--- /dev/null
+++ b/Zip/Archive.html
@@ -0,0 +1,472 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <meta id="repository-name" content="github.com/pablotron/zip-crystal">
+ <link href="../css/style.css" rel="stylesheet" type="text/css" />
+ <script type="text/javascript" src="../js/doc.js"></script>
+ <title>Zip::Archive - github.com/pablotron/zip-crystal</title>
+</head>
+<body>
+
+<div id="types-list">
+ <div id="search-box">
+ <input type="search" id="search-input" placeholder="Search...">
+ </div>
+
+ <ul>
+ <li><a href="../index.html">README</a></li>
+ </ul>
+
+ <ul>
+
+ <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip">
+ <a href="../Zip.html">Zip</a>
+
+ <ul>
+
+ <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive">
+ <a href="../Zip/Archive.html">Archive</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod">
+ <a href="../Zip/CompressionMethod.html">CompressionMethod</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper">
+ <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry">
+ <a href="../Zip/Entry.html">Entry</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error">
+ <a href="../Zip/Error.html">Error</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra">
+ <a href="../Zip/Extra.html">Extra</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags">
+ <a href="../Zip/GeneralFlags.html">GeneralFlags</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper">
+ <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source">
+ <a href="../Zip/Source.html">Source</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper">
+ <a href="../Zip/TimeHelper.html">TimeHelper</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version">
+ <a href="../Zip/Version.html">Version</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer">
+ <a href="../Zip/Writer.html">Writer</a>
+
+ </li>
+
+ <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry">
+ <a href="../Zip/WriterEntry.html">WriterEntry</a>
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+</ul>
+
+</div>
+
+<div id="main-content">
+<h1 class="type-name">
+
+ <span class="kind">class</span> Zip::Archive
+
+</h1>
+
+
+ <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Archive.html">Zip::Archive</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
+
+
+
+
+ <h2>Overview</h2>
+
+ <p>Input archive.</p>
+
+<p>Use <code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead of instantiating this class directly.</p>
+
+
+
+
+
+ <h2>Included Modules</h2>
+ <ul class="other-types-list">
+
+ <li class="other-type">Enumerable(Entry)</li>
+
+ <li class="other-type">Iterable</li>
+
+ </ul>
+
+
+
+
+
+
+
+
+
+
+ <h2>Defined in:</h2>
+
+
+
+
+
+
+ <h2>Class Method Summary</h2>
+ <ul class="list-summary">
+
+ <li class="entry-summary">
+ <a href="#new%28io%3ASource%29-class-method" class="signature"><strong>.new</strong>(io : Source)</a>
+
+ <div class="summary"><p>Create new Zip::Archive from input Zip::Source.</p></div>
+
+ </li>
+
+ </ul>
+
+
+
+ <h2>Instance Method Summary</h2>
+ <ul class="list-summary">
+
+ <li class="entry-summary">
+ <a href="#%5B%5D%28path%3AString%29%3AEntry-instance-method" class="signature"><strong>#[]</strong>(path : String) : Entry</a>
+
+ <div class="summary"><p>Get Zip::Entry by path.</p></div>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#%5B%5D%28id%3AInt%29%3AEntry-instance-method" class="signature"><strong>#[]</strong>(id : Int) : Entry</a>
+
+ <div class="summary"><p>Get Zip::Entry by number.</p></div>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#%5B%5D%3F%28id%3AInt%29%3AEntry%7CNil-instance-method" class="signature"><strong>#[]?</strong>(id : Int) : Entry | Nil</a>
+
+ <div class="summary"><p>Get Zip::Entry by number, or nil if it doesn't exist</p></div>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#%5B%5D%3F%28path%3AString%29%3AEntry%7CNil-instance-method" class="signature"><strong>#[]?</strong>(path : String) : Entry | Nil</a>
+
+ <div class="summary"><p>Return Zip::Entry from path, or nil if it doesn't exist.</p></div>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#comment%3AString-instance-method" class="signature"><strong>#comment</strong> : String</a>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#each</strong>(*args, **options, &block)</a>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#each</strong>(*args, **options)</a>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#entries%3AArray%28Zip%3A%3AEntry%29-instance-method" class="signature"><strong>#entries</strong> : Array(Zip::Entry)</a>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#size</strong>(*args, **options, &block)</a>
+
+ </li>
+
+ <li class="entry-summary">
+ <a href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#size</strong>(*args, **options)</a>
+
+ </li>
+
+ </ul>
+
+
+
+
+
+<div class="methods-inherited">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</div>
+
+
+ <h2>Class Method Detail</h2>
+
+ <div class="entry-detail" id="new&#40;io:Source&#41;-class-method">
+ <div class="signature">
+
+ def self.<strong>new</strong>(io : <a href="../Zip/Source.html">Source</a>)
+
+ <a class="method-permalink" href="#new%28io%3ASource%29-class-method">#</a>
+ </div>
+
+ <div class="doc"><p>Create new Zip::Archive from input Zip::Source.</p>
+
+<p>Use <code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead of calling this method directly.</p></div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+
+
+
+ <h2>Instance Method Detail</h2>
+
+ <div class="entry-detail" id="&#91;&#93;&#40;path:String&#41;:Entry-instance-method">
+ <div class="signature">
+
+ def <strong>[]</strong>(path : String) : <a href="../Zip/Entry.html">Entry</a>
+
+ <a class="method-permalink" href="#%5B%5D%28path%3AString%29%3AEntry-instance-method">#</a>
+ </div>
+
+ <div class="doc"><p>Get Zip::Entry by path.</p>
+
+<p>Example:</p>
+
+<p># get bar.txt and read it into memory io
+io = MemoryIO.new
+zip["bar.txt"].read(io)</p></div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="&#91;&#93;&#40;id:Int&#41;:Entry-instance-method">
+ <div class="signature">
+
+ def <strong>[]</strong>(id : Int) : <a href="../Zip/Entry.html">Entry</a>
+
+ <a class="method-permalink" href="#%5B%5D%28id%3AInt%29%3AEntry-instance-method">#</a>
+ </div>
+
+ <div class="doc"><p>Get Zip::Entry by number.</p>
+
+<p>Example:</p>
+
+<p># read third entry from archive into memory io
+io = MemoryIO.new
+zip[2].read(io)</p></div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="&#91;&#93;?&#40;id:Int&#41;:Entry|Nil-instance-method">
+ <div class="signature">
+
+ def <strong>[]?</strong>(id : Int) : <a href="../Zip/Entry.html">Entry</a> | Nil
+
+ <a class="method-permalink" href="#%5B%5D%3F%28id%3AInt%29%3AEntry%7CNil-instance-method">#</a>
+ </div>
+
+ <div class="doc"><p>Get Zip::Entry by number, or nil if it doesn't exist</p>
+
+<p>Example:</p>
+
+<p># read third entry from archive into memory io
+if e = zip[2]
+io = MemoryIO.new
+e.read(io)
+end</p></div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="&#91;&#93;?&#40;path:String&#41;:Entry|Nil-instance-method">
+ <div class="signature">
+
+ def <strong>[]?</strong>(path : String) : <a href="../Zip/Entry.html">Entry</a> | Nil
+
+ <a class="method-permalink" href="#%5B%5D%3F%28path%3AString%29%3AEntry%7CNil-instance-method">#</a>
+ </div>
+
+ <div class="doc"><p>Return Zip::Entry from path, or nil if it doesn't exist.</p>
+
+<p>Example:</p>
+
+<p># read bar.txt into memory io if it exists
+if e = zip["bar.txt"]?
+io = MemoryIO.new
+e.read(io)
+end</p></div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="comment:String-instance-method">
+ <div class="signature">
+
+ def <strong>comment</strong> : String
+
+ <a class="method-permalink" href="#comment%3AString-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="each&#40;*args,**options,&amp;block&#41;-instance-method">
+ <div class="signature">
+
+ def <strong>each</strong>(*args, **options, &block)
+
+ <a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="each&#40;*args,**options&#41;-instance-method">
+ <div class="signature">
+
+ def <strong>each</strong>(*args, **options)
+
+ <a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="entries:Array&#40;Zip::Entry&#41;-instance-method">
+ <div class="signature">
+
+ def <strong>entries</strong> : Array(<a href="../Zip/Entry.html">Zip::Entry</a>)
+
+ <a class="method-permalink" href="#entries%3AArray%28Zip%3A%3AEntry%29-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="size&#40;*args,**options,&amp;block&#41;-instance-method">
+ <div class="signature">
+
+ def <strong>size</strong>(*args, **options, &block)
+
+ <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+ <div class="entry-detail" id="size&#40;*args,**options&#41;-instance-method">
+ <div class="signature">
+
+ def <strong>size</strong>(*args, **options)
+
+ <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
+ </div>
+
+ <br/>
+ <div>
+
+ </div>
+ </div>
+
+
+
+
+
+</div>
+
+</body>
+</html>