[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>isafile.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="isadirectory.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="linearequation.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>isafile.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
| 63 | |
---|
[290] | 64 | same as <a href="..//Utilities/find.html">find</a> except that as long as the file is 'NOT FOUND', |
---|
| 65 | <a href="..//Utilities/isafile.html">isafile</a> calls |
---|
[338] | 66 | <a href="/Applications/itt/idl64/help/online_help/DIALOG_PICKFILE.html">DIALOG_PICKFILE</a>, to ask the user to select a file. |
---|
[163] | 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | <a name="#_isafile"></a> |
---|
| 73 | |
---|
[242] | 74 | <h2>isafile <font size="-1" color="#006633"> |
---|
[338] | 75 | Input/Output |
---|
[163] | 76 | </font></h2> |
---|
| 77 | |
---|
[234] | 78 | <p><font face="Courier"><i>result = </i>isafile(<i>[<a href="#_isafile_keyword_filein">filein</a>]</i>, <a href="#_isafile_keyword_FILENAME">FILENAME</a>=<i>FILENAME</i>, <a href="#_isafile_keyword_IODIRECTORY">IODIRECTORY</a>=<i>IODIRECTORY</i>, <a href="#_isafile_keyword_NEW">NEW</a>=<i>NEW</i>, <a href="#_isafile_keyword_RECURSIVE">RECURSIVE</a>=<i>RECURSIVE</i>, <a href="#_isafile_keyword_ONLYPRO">ONLYPRO</a>=<i>ONLYPRO</i>, <a href="#_isafile_keyword_ONLYNC">ONLYNC</a>=<i>ONLYNC</i>, <a href="#_isafile_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i>)</font></p> |
---|
[163] | 79 | |
---|
| 80 | |
---|
| 81 | |
---|
[234] | 82 | |
---|
| 83 | <h3>Return value</h3> |
---|
[163] | 84 | the filename with its path |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | <h3>Parameters</h3> |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | <a name="#_isafile_keyword_filein"></a> |
---|
| 92 | <h4>filein |
---|
| 93 | <font size="-1" color="#006633">in</font> |
---|
| 94 | |
---|
| 95 | <font size="-1" color="#006633">optional</font> |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | </h4> |
---|
| 102 | |
---|
[234] | 103 | |
---|
[338] | 104 | a proposed name. If neither filein input parameter or filename keyword are |
---|
[242] | 105 | defined, we ask the user to choose a file. |
---|
[163] | 106 | |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | <h3>Keywords</h3> |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | <a name="#_isafile_keyword_FILENAME"></a> |
---|
| 115 | <h4>FILENAME |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | </h4> |
---|
| 125 | |
---|
[234] | 126 | |
---|
[163] | 127 | a proposed filename. |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | <a name="#_isafile_keyword_IODIRECTORY"></a> |
---|
| 131 | <h4>IODIRECTORY |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | </h4> |
---|
| 141 | |
---|
[234] | 142 | |
---|
[163] | 143 | a directory where we look for the file. this |
---|
| 144 | keyword is taken into account only if the dirname |
---|
| 145 | of filein or filename is '.' |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | <a name="#_isafile_keyword_NEW"></a> |
---|
| 149 | <h4>NEW |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | </h4> |
---|
| 159 | |
---|
[234] | 160 | |
---|
| 161 | to specify that filename is a new file and that we should check only its |
---|
[163] | 162 | path |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | <a name="#_isafile_keyword_RECURSIVE"></a> |
---|
| 166 | <h4>RECURSIVE |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | </h4> |
---|
| 176 | |
---|
[234] | 177 | |
---|
[163] | 178 | performs recursive searching of directory hierarchies. |
---|
[290] | 179 | In a recursive search, <a href="..//Utilities/find.html">find</a> looks recursively for any and all |
---|
[163] | 180 | subdirectories in the file hierarchy rooted at the IODIRECTORY argument. |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | <a name="#_isafile_keyword_ONLYPRO"></a> |
---|
| 184 | <h4>ONLYPRO |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | </h4> |
---|
| 194 | |
---|
[234] | 195 | |
---|
[163] | 196 | force to look only at file ending with .pro |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | <a name="#_isafile_keyword_ONLYNC"></a> |
---|
| 200 | <h4>ONLYNC |
---|
| 201 | |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | |
---|
| 208 | |
---|
| 209 | </h4> |
---|
| 210 | |
---|
[234] | 211 | |
---|
[163] | 212 | force to look only at file ending with .nc |
---|
| 213 | |
---|
| 214 | |
---|
[234] | 215 | <a name="#_isafile_keyword__EXTRA"></a> |
---|
| 216 | <h4>_EXTRA |
---|
[163] | 217 | |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | |
---|
| 225 | </h4> |
---|
| 226 | |
---|
[234] | 227 | |
---|
[290] | 228 | Used to pass keywords to <a href="..//Utilities/find.html">find</a>, |
---|
[338] | 229 | <a href="/Applications/itt/idl64/help/online_help/FILE_SEARCH.html">FILE_SEARCH</a> and |
---|
| 230 | <a href="/Applications/itt/idl64/help/online_help/DIALOG_PICKFILE.html">DIALOG_PICKFILE</a> |
---|
[163] | 231 | |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | |
---|
[234] | 235 | <h3>Examples</h3><pre> |
---|
[402] | 236 | |
---|
| 237 | IDL> print, isafile('/Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro') |
---|
[163] | 238 | /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro |
---|
[402] | 239 | IDL> print, isafile('cm_4mesh.pro', iodir = '/Users/sebastie/SAXO_RD/Commons') |
---|
[163] | 240 | /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro |
---|
[402] | 241 | IDL> print, isafile('cm_4mesh.pro', iodir = !path) |
---|
[163] | 242 | /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro |
---|
[402] | 243 | IDL> print, isafile('cm_4mesh.pro', iodir = '/Users/sebastie/SAXO_RD', /recursive) |
---|
[163] | 244 | /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro |
---|
[402] | 245 | IDL> print, isafile('cm_4mesh.pro', iodir = getenv('HOME'), /recursive) |
---|
[163] | 246 | /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro |
---|
[402] | 247 | IDL> print, isafile('fake_file.pro') |
---|
[163] | 248 | |
---|
[234] | 249 | </pre><h3>Version history</h3> |
---|
[163] | 250 | |
---|
[234] | 251 | <h4>Version</h4> |
---|
[402] | 252 | $Id: isafile.pro 392 2009-02-10 09:34:16Z smasson $ |
---|
[242] | 253 | |
---|
[234] | 254 | <h4>History</h4> |
---|
| 255 | Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
[163] | 256 | 11/2/2000 |
---|
| 257 | June 2005: Sebastien Masson: cleaning, use for file_* functions |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | <font size="-3"><p> </p></font> |
---|
| 276 | <hr size="1" color="#CCCCCC"/> |
---|
| 277 | |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
[187] | 281 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 282 | |
---|
| 283 | </body> |
---|
[249] | 284 | </html> |
---|