source: trunk/SRC/Documentation/idldoc_assistant_output/Utilities/find.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 9.1 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>find.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="demomode_compatibility.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="fitintobox.html"><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Utilities/</font></h1>
58    <h2>find.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 based on <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a>, but it is possible to specify
65 a set of possibles names and a different set of
66 possibles directories names.
67 By default look for files included in !path
68
69 all <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a> keywords can be used.
70
71
72   
73
74     
75      <a name="#_find"></a>
76
77      <h2>find  <font size="-1" color="#006633">
78 find a file
79</font></h2>
80
81      <p><font face="Courier"><i>result = </i>find(<i><a href="#_find_keyword_filein">filein</a></i>, <a href="#_find_keyword_IODIRECTORY">IODIRECTORY</a>=<i>scalar string or array of strings</i>, <a href="#_find_keyword_RECURSIVE">RECURSIVE</a>=<i>RECURSIVE</i>, <a href="#_find_keyword_REPERTOIRE">REPERTOIRE</a>=<i>REPERTOIRE</i>, <a href="#_find_keyword_NOPRO">NOPRO</a>=<i>NOPRO</i>, <a href="#_find_keyword_ONLYPRO">ONLYPRO</a>=<i>ONLYPRO</i>, <a href="#_find_keyword_ONLYNC">ONLYNC</a>=<i>ONLYNC</i>, <a href="#_find_keyword_UNIQUE">UNIQUE</a>=<i>UNIQUE</i>, <a href="#_find_keyword_FIRSTFOUND">FIRSTFOUND</a>=<i>FIRSTFOUND</i>, <a href="#_find_keyword_LOOKALLDIR">LOOKALLDIR</a>=<i>LOOKALLDIR</i>, <a href="#_find_keyword_TRYFIND">TRYFIND</a>=<i>TRYFIND</i>, <a href="#_find_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i>)</font></p>
82
83   
84
85
86    <h3>Return value</h3>
87 A scalar or array variable of string type, containing the
88 name (with the full path of the matching files. If no files
89 exist with names matching the input arguments, <a href="..//Utilities/find.html">find</a> returns
90 the scalar string : 'NOT FOUND'
91
92
93   
94    <h3>Parameters</h3>
95   
96
97    <a name="#_find_keyword_filein"></a>
98    <h4>filein&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
99      <font size="-1" color="#006633">in</font>
100     
101     
102      <font size="-1" color="#006633">required</font>
103     
104      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar string or array of strings</i></font>
105     
106     
107    </h4>
108
109   
110 File name[s] to match. Input names specifications may contain
111 wildcard characters, enabling them to match multiple files
112 (see <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a> for more informations). By default and if
113 necessary, <a href="..//Utilities/find.html">find</a> is looking for filename and also for filename
114 completed with '.pro'
115
116   
117   
118
119   
120    <h3>Keywords</h3>
121
122   
123    <a name="#_find_keyword_IODIRECTORY"></a>
124    <h4>IODIRECTORY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
125     
126     
127     
128     
129     
130      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar string or array of strings</i></font>
131      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>['.',!path]</i></font>
132     
133    </h4>
134
135   
136 Directories names where we are looking for the file.
137 Different directories can be separated by
138 path_sep(/search_path) (':' on unix type machine) as it is done
139 to define !path.
140 Note that if filename's dirname is different from '.', this
141 keyword is not taken into account.
142
143   
144    <a name="#_find_keyword_RECURSIVE"></a>
145    <h4>RECURSIVE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
146     
147     
148     
149     
150     
151     
152     
153     
154    </h4>
155
156   
157 performs recursive searching of directory hierarchies.
158 In a recursive search, <a href="..//Utilities/find.html">find</a> looks recursively for any and all
159 subdirectories in the file hierarchy rooted at the IODIRECTORY argument.
160
161   
162    <a name="#_find_keyword_REPERTOIRE"></a>
163    <h4>REPERTOIRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
164     
165     
166     
167     
168     
169     
170     
171     
172    </h4>
173
174   
175 obsolete. keep for compatibility, use IODIRECTORY keyword
176
177   
178    <a name="#_find_keyword_NOPRO"></a>
179    <h4>NOPRO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180     
181     
182     
183     
184     
185     
186     
187     
188    </h4>
189
190   
191 activate to avoid the automatic search of filename completed with '.pro'
192
193   
194    <a name="#_find_keyword_ONLYPRO"></a>
195    <h4>ONLYPRO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
196     
197     
198     
199     
200     
201     
202     
203     
204    </h4>
205
206   
207 force to look only at file ending with .pro
208
209   
210    <a name="#_find_keyword_ONLYNC"></a>
211    <h4>ONLYNC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
212     
213     
214     
215     
216     
217     
218     
219     
220    </h4>
221
222   
223 force to look only at file ending with .nc
224
225   
226    <a name="#_find_keyword_UNIQUE"></a>
227    <h4>UNIQUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
228     
229     
230     
231     
232     
233     
234     
235     
236    </h4>
237
238   
239 activate to make sure that each element of the output vector is unique.
240
241   
242    <a name="#_find_keyword_FIRSTFOUND"></a>
243    <h4>FIRSTFOUND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
244     
245     
246     
247     
248     
249     
250     
251     
252    </h4>
253
254   
255 activate this keyword to stop looking for the file as soon as we
256 found one. Return a scalar string containing the first file found
257
258   
259    <a name="#_find_keyword_LOOKALLDIR"></a>
260    <h4>LOOKALLDIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
261     
262     
263     
264     
265     
266     
267     
268     
269    </h4>
270
271   
272 activate to look for the file (with a recursive search if needed)
273 in . iodir, homedir, !path + the DATA:TestsData directory if it exists.
274
275   
276    <a name="#_find_keyword_TRYFIND"></a>
277    <h4>TRYFIND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
278     
279     
280     
281     
282     
283     
284     
285     
286    </h4>
287
288   
289 if the file was not found and this keyword is activated, <a href="..//Utilities/find.html">find</a> 
290 will call
291 itself with the keywords /LOOKALLDIR and /FIRSTFOUND to try to find
292 the file we are looking for. Note that if the file was found at the
293 first try this keyword as no effect (which is not the case with LOOKALLDIR)
294
295   
296    <a name="#_find_keyword__EXTRA"></a>
297    <h4>_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
298     
299     
300     
301     
302     
303     
304     
305     
306    </h4>
307
308   
309 Used to pass keywords
310
311   
312   
313
314    <h3>Examples</h3><pre>
315 IDL> print, find('*loadct')
316   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
317   /usr/local/rsi/idl_6.0/lib/loadct.pro
318 IDL> print, find('*loadct', iodir=!dir,/recursive)
319   /usr/local/rsi/idl_6.0/lib/loadct.pro
320   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
321 IDL> print, find('*loadct.pro')
322   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
323   /usr/local/rsi/idl_6.0/lib/loadct.pro
324 IDL> print, find('*loadct',/nopro)
325   NOT FOUND
326 IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib')
327   /usr/local/rsi/idl_6.0/lib/loadct.pro
328 IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib', /test_write)
329   NOT FOUND
330 IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib', /recursive)
331   /usr/local/rsi/idl_6.0/lib/loadct.pro
332   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
333 IDL> print, find('mesh*', iodirectory = [iodir, !path])
334   /Users/sebastie/DATA/ORCA2/meshmaskORCA2closea.nc
335   /Users/sebastie/IDL/meshmaskclosesea.pro
336   /Users/sebastie/IDL/meshmaskclosesea.pro~
337   /Users/sebastie/SAXO_RD/Obsolete/meshlec.pro
338   /usr/local/rsi/idl_6.0/lib/mesh_obj.pro
339
340    </pre><h3>Version history</h3>
341   
342    <h4>Version</h4>
343 $Id: find.pro 327 2007-12-13 16:22:35Z pinsard $
344
345    <h4>History</h4>
346 Sebastien Masson (smasson@lodyc.jussieu.fr)
347                       28/4/1999
348                       6/7/1999: compatibility mac and windows
349 June 2005: Sebastien Masson: cleaning, use for file_* functions
350
351   
352
353   
354   
355   
356   
357   
358
359   
360   
361   
362   
363   
364   
365   
366
367    <font size="-3"><p>&nbsp;</p></font>
368    <hr size="1" color="#CCCCCC"/>
369     
370
371   
372
373    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
374
375  </body>
376</html>
Note: See TracBrowser for help on using the repository browser.