285 lines
8.4 KiB
HTML
285 lines
8.4 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
|||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|||
|
<head>
|
|||
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
|||
|
|
|||
|
<title>Class: ReadFile</title>
|
|||
|
|
|||
|
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
|||
|
|
|||
|
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
|||
|
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
|||
|
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
|||
|
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
|||
|
|
|||
|
</head>
|
|||
|
<body id="top" class="class">
|
|||
|
|
|||
|
<div id="metadata">
|
|||
|
<div id="home-metadata">
|
|||
|
<div id="home-section" class="section">
|
|||
|
<h3 class="section-header">
|
|||
|
<a href="./index.html">Home</a>
|
|||
|
<a href="./index.html#classes">Classes</a>
|
|||
|
<a href="./index.html#methods">Methods</a>
|
|||
|
</h3>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="file-metadata">
|
|||
|
<div id="file-list-section" class="section">
|
|||
|
<h3 class="section-header">In Files</h3>
|
|||
|
<div class="section-body">
|
|||
|
<ul>
|
|||
|
|
|||
|
<li><a href="./m/ReadFile_rb.html?TB_iframe=true&height=550&width=785"
|
|||
|
class="thickbox" title="m/ReadFile.rb">m/ReadFile.rb</a></li>
|
|||
|
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="class-metadata">
|
|||
|
|
|||
|
<!-- Parent Class -->
|
|||
|
<div id="parent-class-section" class="section">
|
|||
|
<h3 class="section-header">Parent</h3>
|
|||
|
|
|||
|
<p class="link">Object</p>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!-- Method Quickref -->
|
|||
|
<div id="method-list-section" class="section">
|
|||
|
<h3 class="section-header">Methods</h3>
|
|||
|
<ul class="link-list">
|
|||
|
|
|||
|
<li><a href="#method-c-new">::new</a></li>
|
|||
|
|
|||
|
<li><a href="#method-i-getALL">#getALL</a></li>
|
|||
|
|
|||
|
<li><a href="#method-i-getUrls">#getUrls</a></li>
|
|||
|
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="project-metadata">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div id="classindex-section" class="section project-section">
|
|||
|
<h3 class="section-header">Class/Module Index
|
|||
|
<span class="search-toggle"><img src="./images/find.png"
|
|||
|
height="16" width="16" alt="[+]"
|
|||
|
title="show/hide quicksearch" /></span></h3>
|
|||
|
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|||
|
<fieldset>
|
|||
|
<legend>Quicksearch</legend>
|
|||
|
<input type="text" name="quicksearch" value=""
|
|||
|
class="quicksearch-field" />
|
|||
|
</fieldset>
|
|||
|
</form>
|
|||
|
|
|||
|
<ul class="link-list">
|
|||
|
|
|||
|
<li><a href="./CtrlCheckLinks.html">CtrlCheckLinks</a></li>
|
|||
|
|
|||
|
<li><a href="./CtrlHistoLink.html">CtrlHistoLink</a></li>
|
|||
|
|
|||
|
<li><a href="./Menu.html">Menu</a></li>
|
|||
|
|
|||
|
<li><a href="./ReadFile.html">ReadFile</a></li>
|
|||
|
|
|||
|
<li><a href="./Vue1.html">Vue1</a></li>
|
|||
|
|
|||
|
<li><a href="./VueHisto.html">VueHisto</a></li>
|
|||
|
|
|||
|
<li><a href="./VueMenu.html">VueMenu</a></li>
|
|||
|
|
|||
|
<li><a href="./VueResult.html">VueResult</a></li>
|
|||
|
|
|||
|
</ul>
|
|||
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="documentation">
|
|||
|
<h1 class="class">ReadFile</h1>
|
|||
|
|
|||
|
<div id="description" class="description">
|
|||
|
|
|||
|
<p>Classe permettant l’acces et la recuperation des données dans les fichiers</p>
|
|||
|
|
|||
|
</div><!-- description -->
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div id="5Buntitled-5D" class="documentation-section">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!-- Methods -->
|
|||
|
|
|||
|
<div id="public-class-method-details" class="method-section section">
|
|||
|
<h3 class="section-header">Public Class Methods</h3>
|
|||
|
|
|||
|
|
|||
|
<div id="new-method" class="method-detail ">
|
|||
|
<a name="method-c-new"></a>
|
|||
|
|
|||
|
|
|||
|
<div class="method-heading">
|
|||
|
<span class="method-name">new</span><span
|
|||
|
class="method-args">(pFic)</span>
|
|||
|
<span class="method-click-advice">click to toggle source</span>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="method-description">
|
|||
|
|
|||
|
<p><b>Ouverture d'un fichier en lecture</b></p>
|
|||
|
<ul><li>
|
|||
|
<p>String pFic : chemin de fichier à ouvrir</p>
|
|||
|
</li></ul>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="method-source-code" id="new-source">
|
|||
|
<pre>
|
|||
|
<span class="ruby-comment"># File m/ReadFile.rb, line 5</span>
|
|||
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pFic</span>)
|
|||
|
<span class="ruby-ivar">@fic</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">pFic</span>, <span class="ruby-string">"r"</span>)
|
|||
|
<span class="ruby-keyword">end</span></pre>
|
|||
|
</div><!-- new-source -->
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div><!-- new-method -->
|
|||
|
|
|||
|
|
|||
|
</div><!-- public-class-method-details -->
|
|||
|
|
|||
|
<div id="public-instance-method-details" class="method-section section">
|
|||
|
<h3 class="section-header">Public Instance Methods</h3>
|
|||
|
|
|||
|
|
|||
|
<div id="getALL-method" class="method-detail ">
|
|||
|
<a name="method-i-getALL"></a>
|
|||
|
|
|||
|
|
|||
|
<div class="method-heading">
|
|||
|
<span class="method-name">getALL</span><span
|
|||
|
class="method-args">()</span>
|
|||
|
<span class="method-click-advice">click to toggle source</span>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="method-description">
|
|||
|
|
|||
|
<p><b>Revoit tout le contenu d'un fichier sous forme d'une chaine de
|
|||
|
caractere</b></p>
|
|||
|
<ul><li>
|
|||
|
<p>return : string contenant tout le texte du fichier</p>
|
|||
|
</li></ul>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="method-source-code" id="getALL-source">
|
|||
|
<pre>
|
|||
|
<span class="ruby-comment"># File m/ReadFile.rb, line 10</span>
|
|||
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">getALL</span>
|
|||
|
<span class="ruby-identifier">all</span> = <span class="ruby-ivar">@fic</span>.<span class="ruby-identifier">read</span>
|
|||
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">all</span>
|
|||
|
<span class="ruby-keyword">end</span></pre>
|
|||
|
</div><!-- getALL-source -->
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div><!-- getALL-method -->
|
|||
|
|
|||
|
|
|||
|
<div id="getUrls-method" class="method-detail ">
|
|||
|
<a name="method-i-getUrls"></a>
|
|||
|
|
|||
|
|
|||
|
<div class="method-heading">
|
|||
|
<span class="method-name">getUrls</span><span
|
|||
|
class="method-args">()</span>
|
|||
|
<span class="method-click-advice">click to toggle source</span>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="method-description">
|
|||
|
|
|||
|
<p><b>Sort les URLs d'un fichier</b></p>
|
|||
|
<ul><li>
|
|||
|
<p>return : string[] contenant tout les liens http/https du fichier</p>
|
|||
|
</li></ul>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="method-source-code" id="getUrls-source">
|
|||
|
<pre>
|
|||
|
<span class="ruby-comment"># File m/ReadFile.rb, line 16</span>
|
|||
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">getUrls</span>
|
|||
|
<span class="ruby-identifier">txt</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">getALL</span>
|
|||
|
<span class="ruby-identifier">url</span> = <span class="ruby-constant">URI</span><span class="ruby-operator">::</span><span class="ruby-identifier">extract</span>(<span class="ruby-identifier">txt</span>, <span class="ruby-regexp">/http(s)?/</span>)
|
|||
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">url</span>
|
|||
|
<span class="ruby-keyword">end</span></pre>
|
|||
|
</div><!-- getUrls-source -->
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div><!-- getUrls-method -->
|
|||
|
|
|||
|
|
|||
|
</div><!-- public-instance-method-details -->
|
|||
|
|
|||
|
</div><!-- 5Buntitled-5D -->
|
|||
|
|
|||
|
|
|||
|
</div><!-- documentation -->
|
|||
|
|
|||
|
<div id="validator-badges">
|
|||
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|||
|
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|||
|
Rdoc Generator</a> 2</small>.</p>
|
|||
|
</div>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|
|||
|
|