[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>read_ftp.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="ncdf_lec.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="read_ncdf.html"><img src="./../../next.gif" border="0" alt="Next"></a></td> |
---|
| 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <h1><font size="-2">ToBeReviewed/LECTURE/</font></h1> |
---|
| 58 | <h2>read_ftp.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
[234] | 63 | |
---|
[163] | 64 | |
---|
[234] | 65 | |
---|
| 66 | |
---|
| 67 | |
---|
[163] | 68 | READ_FTP, remote_host [, files] [, directory] [,/FILE] [,DATA=variable] |
---|
| 69 | [,USER=string] [,PASS=string] [,/PTR] |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | <h2>Routine summary</h2> |
---|
| 74 | |
---|
| 75 | <dl> |
---|
| 76 | |
---|
| 77 | <dt><a href="#_ftp_post">ftp_post<i>, u, cmd, res</i>, out=<i>out</i>, count=<i>count</i></a><dt> |
---|
[234] | 78 | <dd><font size="-1"> </font></dd> |
---|
[163] | 79 | |
---|
| 80 | <dt><a href="#_ftp_parse_pasv">ftp_parse_pasv<i>, text, host, port</i></a><dt> |
---|
[234] | 81 | <dd><font size="-1"> </font></dd> |
---|
[163] | 82 | |
---|
| 83 | <dt><a href="#_read_ftp">read_ftp<i>, site, files, dir, port</i>, data=<i>data</i>, file=<i>file</i>, user=<i>user</i>, pass=<i>pass</i>, ptr=<i>ptr</i></a><dt> |
---|
| 84 | <dd><font size="-1"> </font></dd> |
---|
| 85 | |
---|
| 86 | </dl> |
---|
| 87 | |
---|
| 88 | <p> </p> |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | <a name="#_ftp_post"></a> |
---|
| 93 | |
---|
| 94 | <h2>ftp_post <font size="-1" color="#006633"> |
---|
[234] | 95 | </font></h2> |
---|
[163] | 96 | |
---|
| 97 | <p><font face="Courier">ftp_post<i>, <a href="#_ftp_post_keyword_u">u</a>, <a href="#_ftp_post_keyword_cmd">cmd</a>, <a href="#_ftp_post_keyword_res">res</a></i>, <a href="#_ftp_post_keyword_out">out</a>=<i>out</i>, <a href="#_ftp_post_keyword_count">count</a>=<i>count</i></font></p> |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
[234] | 101 | |
---|
[163] | 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | <h3>Parameters</h3> |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | <a name="#_ftp_post_keyword_u"></a> |
---|
| 109 | <h4>u |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | </h4> |
---|
| 119 | |
---|
[234] | 120 | |
---|
[163] | 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | <a name="#_ftp_post_keyword_cmd"></a> |
---|
| 125 | <h4>cmd |
---|
| 126 | |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | </h4> |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | <a name="#_ftp_post_keyword_res"></a> |
---|
| 141 | <h4>res |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | </h4> |
---|
| 151 | |
---|
[234] | 152 | |
---|
[163] | 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | <h3>Keywords</h3> |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | <a name="#_ftp_post_keyword_out"></a> |
---|
| 162 | <h4>out |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | </h4> |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | <a name="#_ftp_post_keyword_count"></a> |
---|
| 177 | <h4>count |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | </h4> |
---|
| 187 | |
---|
| 188 | |
---|
[234] | 189 | Upon return, the number of elements in the result set. |
---|
[163] | 190 | This is only important when the result set is the empty |
---|
| 191 | set, in which case COUNT is set to zero. |
---|
[234] | 192 | |
---|
[163] | 193 | |
---|
| 194 | |
---|
| 195 | |
---|
[234] | 196 | <h3>Examples</h3><pre> |
---|
[163] | 197 | |
---|
[234] | 198 | </pre><h3>Version history</h3> |
---|
[163] | 199 | |
---|
| 200 | <h4>Version</h4> |
---|
[402] | 201 | $Id: read_ftp.pro 371 2008-08-07 09:32:02Z pinsard $ |
---|
[338] | 202 | |
---|
[163] | 203 | <h4>History</h4> |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | <h3>Known issues</h3> |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | <h4>Restrictions</h4> |
---|
| 212 | |
---|
[234] | 213 | |
---|
[163] | 214 | |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | <font size="-3"><p> </p></font> |
---|
| 223 | <hr size="1" color="#CCCCCC"/> |
---|
| 224 | |
---|
| 225 | <a name="#_ftp_parse_pasv"></a> |
---|
| 226 | |
---|
| 227 | <h2>ftp_parse_pasv <font size="-1" color="#006633"> |
---|
[234] | 228 | </font></h2> |
---|
[163] | 229 | |
---|
| 230 | <p><font face="Courier">ftp_parse_pasv<i>, <a href="#_ftp_parse_pasv_keyword_text">text</a>, <a href="#_ftp_parse_pasv_keyword_host">host</a>, <a href="#_ftp_parse_pasv_keyword_port">port</a></i></font></p> |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | |
---|
[234] | 234 | |
---|
[163] | 235 | |
---|
| 236 | |
---|
| 237 | |
---|
| 238 | <h3>Parameters</h3> |
---|
| 239 | |
---|
| 240 | |
---|
| 241 | <a name="#_ftp_parse_pasv_keyword_text"></a> |
---|
| 242 | <h4>text |
---|
| 243 | |
---|
| 244 | |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | |
---|
| 249 | |
---|
| 250 | |
---|
| 251 | </h4> |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | ASCII text string containing the message. |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | <a name="#_ftp_parse_pasv_keyword_host"></a> |
---|
| 259 | <h4>host |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | </h4> |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | <a name="#_ftp_parse_pasv_keyword_port"></a> |
---|
| 275 | <h4>port |
---|
| 276 | |
---|
| 277 | |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | </h4> |
---|
| 285 | |
---|
| 286 | |
---|
[234] | 287 | |
---|
[163] | 288 | |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | |
---|
[234] | 293 | <h3>Examples</h3><pre> |
---|
[163] | 294 | |
---|
[234] | 295 | </pre><h3>Version history</h3> |
---|
[163] | 296 | |
---|
| 297 | <h4>Version</h4> |
---|
[402] | 298 | $Id: read_ftp.pro 371 2008-08-07 09:32:02Z pinsard $ |
---|
[234] | 299 | |
---|
[163] | 300 | <h4>History</h4> |
---|
| 301 | |
---|
| 302 | |
---|
| 303 | |
---|
| 304 | <h3>Known issues</h3> |
---|
| 305 | |
---|
| 306 | |
---|
| 307 | |
---|
| 308 | <h4>Restrictions</h4> |
---|
| 309 | |
---|
[234] | 310 | |
---|
[163] | 311 | |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | <font size="-3"><p> </p></font> |
---|
| 320 | <hr size="1" color="#CCCCCC"/> |
---|
| 321 | |
---|
| 322 | <a name="#_read_ftp"></a> |
---|
| 323 | |
---|
| 324 | <h2>read_ftp </h2> |
---|
| 325 | |
---|
| 326 | <p><font face="Courier">read_ftp<i>, <a href="#_read_ftp_keyword_site">site</a>, <a href="#_read_ftp_keyword_files">files</a>, <a href="#_read_ftp_keyword_dir">dir</a>, <a href="#_read_ftp_keyword_port">port</a></i>, <a href="#_read_ftp_keyword_data">data</a>=<i>data</i>, <a href="#_read_ftp_keyword_file">file</a>=<i>file</i>, <a href="#_read_ftp_keyword_user">user</a>=<i>user</i>, <a href="#_read_ftp_keyword_pass">pass</a>=<i>pass</i>, <a href="#_read_ftp_keyword_ptr">ptr</a>=<i>ptr</i></font></p> |
---|
| 327 | |
---|
| 328 | |
---|
| 329 | |
---|
| 330 | |
---|
| 331 | |
---|
| 332 | |
---|
| 333 | |
---|
| 334 | <h3>Parameters</h3> |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | <a name="#_read_ftp_keyword_site"></a> |
---|
| 338 | <h4>site |
---|
| 339 | |
---|
| 340 | |
---|
| 341 | |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | |
---|
| 345 | |
---|
| 346 | |
---|
| 347 | </h4> |
---|
| 348 | |
---|
| 349 | |
---|
| 350 | |
---|
| 351 | |
---|
| 352 | <a name="#_read_ftp_keyword_files"></a> |
---|
| 353 | <h4>files |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | |
---|
| 361 | |
---|
| 362 | </h4> |
---|
| 363 | |
---|
| 364 | |
---|
| 365 | A single filename or an array of filenames to be retrieved. |
---|
| 366 | |
---|
| 367 | |
---|
| 368 | |
---|
| 369 | <a name="#_read_ftp_keyword_dir"></a> |
---|
| 370 | <h4>dir |
---|
| 371 | |
---|
| 372 | |
---|
| 373 | |
---|
| 374 | |
---|
| 375 | |
---|
| 376 | |
---|
| 377 | |
---|
| 378 | |
---|
| 379 | </h4> |
---|
| 380 | |
---|
| 381 | |
---|
| 382 | Remote directory where the files reside on the ftp server |
---|
| 383 | |
---|
| 384 | |
---|
| 385 | |
---|
| 386 | <a name="#_read_ftp_keyword_port"></a> |
---|
| 387 | <h4>port |
---|
| 388 | |
---|
| 389 | |
---|
| 390 | |
---|
| 391 | |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | |
---|
| 395 | |
---|
| 396 | </h4> |
---|
| 397 | |
---|
| 398 | |
---|
| 399 | |
---|
| 400 | |
---|
| 401 | |
---|
| 402 | |
---|
| 403 | <h3>Keywords</h3> |
---|
| 404 | |
---|
| 405 | |
---|
| 406 | <a name="#_read_ftp_keyword_data"></a> |
---|
| 407 | <h4>data |
---|
| 408 | |
---|
| 409 | |
---|
| 410 | |
---|
| 411 | |
---|
| 412 | |
---|
| 413 | |
---|
| 414 | |
---|
| 415 | |
---|
| 416 | </h4> |
---|
| 417 | |
---|
| 418 | |
---|
| 419 | Set this to a named variable that will contain either a |
---|
| 420 | byte array or an array of pointers to byte arrays with the |
---|
| 421 | transferred data. If there is more than one file, an array |
---|
| 422 | of pointers is returned, one for each file. |
---|
| 423 | Note that when downloading large files using /FILE |
---|
| 424 | instead will require much less memory since the entire file |
---|
| 425 | is not stored in a variable in that case. |
---|
| 426 | |
---|
| 427 | |
---|
| 428 | <a name="#_read_ftp_keyword_file"></a> |
---|
| 429 | <h4>file |
---|
| 430 | |
---|
| 431 | |
---|
| 432 | |
---|
| 433 | |
---|
| 434 | |
---|
| 435 | |
---|
| 436 | |
---|
| 437 | |
---|
| 438 | </h4> |
---|
| 439 | |
---|
| 440 | |
---|
| 441 | Set this keyword to make a local copy of the file to be |
---|
| 442 | transferred. The local file will have the same name as the |
---|
| 443 | remote file and will be placed in the current working |
---|
| 444 | directory. |
---|
| 445 | |
---|
| 446 | |
---|
| 447 | <a name="#_read_ftp_keyword_user"></a> |
---|
| 448 | <h4>user |
---|
| 449 | |
---|
| 450 | |
---|
| 451 | |
---|
| 452 | |
---|
| 453 | |
---|
| 454 | |
---|
[338] | 455 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>anonymous</i></font> |
---|
[163] | 456 | |
---|
| 457 | </h4> |
---|
| 458 | |
---|
| 459 | |
---|
| 460 | Specify user name to connect to server with. |
---|
| 461 | |
---|
| 462 | |
---|
| 463 | <a name="#_read_ftp_keyword_pass"></a> |
---|
| 464 | <h4>pass |
---|
| 465 | |
---|
| 466 | |
---|
| 467 | |
---|
| 468 | |
---|
| 469 | |
---|
| 470 | |
---|
[338] | 471 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>test@test.com</i></font> |
---|
[163] | 472 | |
---|
| 473 | </h4> |
---|
| 474 | |
---|
| 475 | |
---|
| 476 | Specify password to use when connecting. |
---|
| 477 | |
---|
| 478 | |
---|
| 479 | <a name="#_read_ftp_keyword_ptr"></a> |
---|
| 480 | <h4>ptr |
---|
| 481 | |
---|
| 482 | |
---|
| 483 | |
---|
| 484 | |
---|
| 485 | |
---|
| 486 | |
---|
| 487 | |
---|
| 488 | |
---|
| 489 | </h4> |
---|
| 490 | |
---|
| 491 | |
---|
| 492 | Set this keyword to return an array of pointers |
---|
| 493 | even when there is only one file. |
---|
| 494 | |
---|
| 495 | |
---|
| 496 | |
---|
| 497 | |
---|
[234] | 498 | <h3>Examples</h3><pre> |
---|
[163] | 499 | 1) Retrieve and print the contents of ftp://ftp.rsinc.com/pub/gzip/README.GZIP: |
---|
| 500 | IDL> READ_FTP, 'ftp://ftp.rsinc.com/pub/gzip/README.GZIP', DATA=data |
---|
| 501 | IDL> help, data |
---|
| 502 | DATA BYTE = Array[2134] |
---|
| 503 | IDL> print, string(data) |
---|
| 504 | ------------------------------------------------------------------------------ |
---|
| 505 | README file: Research Systems Anonymous FTP site (ftp.rsinc.com) |
---|
| 506 | pub directory |
---|
| 507 | gzip directory |
---|
| 508 | ------------------------------------------------------------------------------ |
---|
| 509 | ... |
---|
| 510 | |
---|
| 511 | 2) Retrieve some files from podaac.jpl.nasa.gov and store the files |
---|
| 512 | in the current working directory: |
---|
| 513 | |
---|
[402] | 514 | IDL> files = string(lindgen(10)+50,format='(%"MGB370.%3.3d.gz")') |
---|
| 515 | IDL> READ_FTP, 'podaac.jpl.nasa.gov', files, $ |
---|
| 516 | IDL> 'pub/sea_surface_height/topex_poseidon/mgdrb/data/MGB_370', /FILE |
---|
| 517 | IDL> spawn,'dir MGB*',/log_output |
---|
[163] | 518 | Volume in drive C is Local Disk |
---|
| 519 | Volume Serial Number is 34CE-24DF |
---|
| 520 | |
---|
| 521 | Directory of C:testtest0307 |
---|
| 522 | |
---|
| 523 | 07/28/2003 11:58a 362,167 MGB370.050.gz |
---|
| 524 | 07/28/2003 11:58a 333,005 MGB370.051.gz |
---|
| 525 | 07/28/2003 11:58a 310,287 MGB370.052.gz |
---|
| 526 | 07/28/2003 11:58a 358,771 MGB370.053.gz |
---|
| 527 | 07/28/2003 11:59a 387,282 MGB370.054.gz |
---|
| 528 | 07/28/2003 11:59a 361,633 MGB370.055.gz |
---|
| 529 | 07/28/2003 11:59a 383,075 MGB370.056.gz |
---|
| 530 | 07/28/2003 11:59a 365,844 MGB370.057.gz |
---|
| 531 | 07/28/2003 11:59a 383,918 MGB370.058.gz |
---|
| 532 | 07/28/2003 12:00p 372,712 MGB370.059.gz |
---|
| 533 | 10 File(s) 3,618,694 bytes |
---|
| 534 | |
---|
[234] | 535 | These compressed files can consequently be opened with OPENR and the |
---|
[163] | 536 | /COMPRESSED keyword. |
---|
| 537 | |
---|
[234] | 538 | </pre><h3>Version history</h3> |
---|
[163] | 539 | |
---|
| 540 | <h4>Version</h4> |
---|
[402] | 541 | $Id: read_ftp.pro 371 2008-08-07 09:32:02Z pinsard $ |
---|
[163] | 542 | |
---|
| 543 | <h4>History</h4> |
---|
| 544 | |
---|
| 545 | |
---|
| 546 | |
---|
| 547 | <h3>Known issues</h3> |
---|
| 548 | |
---|
| 549 | |
---|
[234] | 550 | <h4>Todo items</h4> |
---|
[163] | 551 | seb: que fait-on de "syntax" au debut du header? |
---|
| 552 | give examples with date in year 0 (should not exists but may happen) |
---|
[234] | 553 | |
---|
[163] | 554 | |
---|
| 555 | |
---|
| 556 | |
---|
| 557 | |
---|
| 558 | |
---|
| 559 | |
---|
| 560 | |
---|
| 561 | |
---|
| 562 | |
---|
| 563 | |
---|
| 564 | <font size="-3"><p> </p></font> |
---|
| 565 | <hr size="1" color="#CCCCCC"/> |
---|
| 566 | |
---|
| 567 | |
---|
| 568 | |
---|
| 569 | |
---|
[187] | 570 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 571 | |
---|
| 572 | </body> |
---|
[249] | 573 | </html> |
---|