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

Last change on this file since 402 was 402, checked in by smasson, 15 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
68 By default look for files included in !path
69
70 all <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a> keywords can be used.
71
72
73   
74
75     
76      <a name="#_find"></a>
77
78      <h2>find  <font size="-1" color="#006633">
79 find a file
80</font></h2>
81
82      <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>
83
84   
85
86
87    <h3>Return value</h3>
88 A scalar or array variable of string type, containing the
89 name (with the full path of the matching files. If no files
90 exist with names matching the input arguments, <a href="..//Utilities/find.html">find</a> returns
91 the scalar string : 'NOT FOUND'
92
93
94   
95    <h3>Parameters</h3>
96   
97
98    <a name="#_find_keyword_filein"></a>
99    <h4>filein&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
100      <font size="-1" color="#006633">in</font>
101     
102     
103      <font size="-1" color="#006633">required</font>
104     
105      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar string or array of strings</i></font>
106     
107     
108    </h4>
109
110   
111 File name[s] to match. Input names specifications may contain
112 wildcard characters, enabling them to match multiple files
113 (see <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a> for more informations). By default and if
114 necessary, <a href="..//Utilities/find.html">find</a> is looking for filename and also for filename
115 completed with '.pro'
116
117   
118   
119
120   
121    <h3>Keywords</h3>
122
123   
124    <a name="#_find_keyword_IODIRECTORY"></a>
125    <h4>IODIRECTORY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
126     
127     
128     
129     
130     
131      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar string or array of strings</i></font>
132      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>['.',!path]</i></font>
133     
134    </h4>
135
136   
137 Directories names where we are looking for the file.
138 Different directories can be separated by
139 path_sep(/search_path) (':' on unix type machine) as it is done
140 to define !path.
141 Note that if filename's dirname is different from '.', this
142 keyword is not taken into account.
143
144   
145    <a name="#_find_keyword_RECURSIVE"></a>
146    <h4>RECURSIVE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147     
148     
149     
150     
151     
152     
153     
154     
155    </h4>
156
157   
158 performs recursive searching of directory hierarchies.
159 In a recursive search, <a href="..//Utilities/find.html">find</a> looks recursively for any and all
160 subdirectories in the file hierarchy rooted at the IODIRECTORY argument.
161
162   
163    <a name="#_find_keyword_REPERTOIRE"></a>
164    <h4>REPERTOIRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
165     
166     
167     
168     
169     
170     
171     
172     
173    </h4>
174
175   
176 obsolete. keep for compatibility, use IODIRECTORY keyword
177
178   
179    <a name="#_find_keyword_NOPRO"></a>
180    <h4>NOPRO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181     
182     
183     
184     
185     
186     
187     
188     
189    </h4>
190
191   
192 activate to avoid the automatic search of filename completed with '.pro'
193
194   
195    <a name="#_find_keyword_ONLYPRO"></a>
196    <h4>ONLYPRO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
197     
198     
199     
200     
201     
202     
203     
204     
205    </h4>
206
207   
208 force to look only at file ending with .pro
209
210   
211    <a name="#_find_keyword_ONLYNC"></a>
212    <h4>ONLYNC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
213     
214     
215     
216     
217     
218     
219     
220     
221    </h4>
222
223   
224 force to look only at file ending with .nc
225
226   
227    <a name="#_find_keyword_UNIQUE"></a>
228    <h4>UNIQUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
229     
230     
231     
232     
233     
234     
235     
236     
237    </h4>
238
239   
240 activate to make sure that each element of the output vector is unique.
241
242   
243    <a name="#_find_keyword_FIRSTFOUND"></a>
244    <h4>FIRSTFOUND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
245     
246     
247     
248     
249     
250     
251     
252     
253    </h4>
254
255   
256 activate this keyword to stop looking for the file as soon as we
257 found one. Return a scalar string containing the first file found
258
259   
260    <a name="#_find_keyword_LOOKALLDIR"></a>
261    <h4>LOOKALLDIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
262     
263     
264     
265     
266     
267     
268     
269     
270    </h4>
271
272   
273 activate to look for the file (with a recursive search if needed)
274 in . iodir, homedir, !path + the DATA:TestsData directory if it exists.
275
276   
277    <a name="#_find_keyword_TRYFIND"></a>
278    <h4>TRYFIND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
279     
280     
281     
282     
283     
284     
285     
286     
287    </h4>
288
289   
290 if the file was not found and this keyword is activated, <a href="..//Utilities/find.html">find</a> 
291 will call
292 itself with the keywords /LOOKALLDIR and /FIRSTFOUND to try to find
293 the file we are looking for. Note that if the file was found at the
294 first try this keyword as no effect (which is not the case with LOOKALLDIR)
295
296   
297    <a name="#_find_keyword__EXTRA"></a>
298    <h4>_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
299     
300     
301     
302     
303     
304     
305     
306     
307    </h4>
308
309   
310 Used to pass keywords
311
312   
313   
314
315    <h3>Examples</h3><pre>
316
317   IDL> print, find('*loadct')
318   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
319   /usr/local/rsi/idl_6.0/lib/loadct.pro
320   IDL> print, find('*loadct', iodir=!dir,/recursive)
321   /usr/local/rsi/idl_6.0/lib/loadct.pro
322   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
323   IDL> print, find('*loadct.pro')
324   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
325   /usr/local/rsi/idl_6.0/lib/loadct.pro
326   IDL> print, find('*loadct',/nopro)
327   NOT FOUND
328   IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib')
329   /usr/local/rsi/idl_6.0/lib/loadct.pro
330   IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib', /test_write)
331   NOT FOUND
332   IDL> print, find('*loadct', iodir = '/usr/local/rsi/idl_6.0/lib', /recursive)
333   /usr/local/rsi/idl_6.0/lib/loadct.pro
334   /usr/local/rsi/idl_6.0/lib/utilities/xloadct.pro
335   IDL> print, find('mesh*', iodirectory = [iodir, !path])
336   /Users/sebastie/DATA/ORCA2/meshmaskORCA2closea.nc
337   /Users/sebastie/IDL/meshmaskclosesea.pro
338   /Users/sebastie/IDL/meshmaskclosesea.pro~
339   /Users/sebastie/SAXO_RD/Obsolete/meshlec.pro
340   /usr/local/rsi/idl_6.0/lib/mesh_obj.pro
341
342    </pre><h3>Version history</h3>
343   
344    <h4>Version</h4>
345 $Id: find.pro 375 2008-08-08 15:55:40Z pinsard $
346
347    <h4>History</h4>
348 Sebastien Masson (smasson@lodyc.jussieu.fr)
349  - 28/4/1999
350  - 6/7/1999: compatibility mac and windows
351  - June 2005: Sebastien Masson: cleaning, use for file_* functions
352
353   
354
355   
356   
357   
358   
359   
360
361   
362   
363   
364   
365   
366   
367   
368
369    <font size="-3"><p>&nbsp;</p></font>
370    <hr size="1" color="#CCCCCC"/>
371     
372
373   
374
375    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
376
377  </body>
378</html>
Note: See TracBrowser for help on using the repository browser.