Sha256: 0114773490ba058f696fc06ea9822ae5fa227fa8cb8e1ef4703ccc4c84f48595

Contents?: true

Size: 1.94 KB

Versions: 9

Compression:

Stored size: 1.94 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>save_as (FileSystemImage)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/FileSystemImage.rb, line 150</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_as</span>(<span class="ruby-identifier">filename</span>)
    <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">filename</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/\.gz$/</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span>
                        <span class="ruby-identifier">require</span> <span class="ruby-value str">'zlib'</span>
      <span class="ruby-identifier">f</span>=<span class="ruby-constant">Zlib</span><span class="ruby-operator">::</span><span class="ruby-constant">GzipWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-value str">&quot;wb&quot;</span>))
    <span class="ruby-keyword kw">else</span>
      <span class="ruby-identifier">f</span>=<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-value str">&quot;wb&quot;</span>)
    <span class="ruby-keyword kw">end</span>    
    <span class="ruby-identifier">f</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-identifier">file_bytes</span>
    <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ripxplore-0.17.1 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.17.0 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.16.1 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.15.1 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.14.1 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.14.0 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.13.0 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.12.0 doc/classes/FileSystemImage.src/M000291.html
ripxplore-0.11.0 doc/classes/FileSystemImage.src/M000291.html