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