Sha256: 9fd94e163b4033da7178647c5c8d2475458b7b3c0c78d681921aa5fcb19c1d5a
Contents?: true
Size: 1.81 KB
Versions: 12
Compression:
Stored size: 1.81 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>force_icon_to_cache (FileCache)</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/FileCache.rb, line 129</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">force_icon_to_cache</span>(<span class="ruby-identifier">native_file</span>) <span class="ruby-identifier">cache_filename</span>=<span class="ruby-identifier">cache_name_for_icon</span>(<span class="ruby-identifier">native_file</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">cache_filename</span>) <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">local_file</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">cache_filename</span>,<span class="ruby-value str">"wb"</span>) <span class="ruby-identifier">local_file</span><span class="ruby-operator"><<</span><span class="ruby-identifier">native_file</span>.<span class="ruby-identifier">to_icon</span> <span class="ruby-identifier">local_file</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cache_filename</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
12 entries across 6 versions & 1 rubygems