>  Docs Center  >  Libraries  >  Motley  >  MGH_FILE_COPY

MGH_FILE_COPY

MGH_FILE_COPY

Name


  MGH_FILE_COPY

Purpose


  This procedure reads the contents of a file & writes them to
  another file.

Calling Sequence


  MGH_FILE_COPY, InFile, OutFile

Positional Parameters


  infile (input, scalar string)
    Input file name.
  outfile (input, scalar string)
    Output file name.

Keyword Parameters


  BUFSIZE (input, scalar integer)
    This keyword has an effect only when the TEXT keyword *is not*
    set. It specifies the size (in bytes) of chunks read &
    written. Default is 2^16 (64kiB)
  GUNZIP (input, logical)
    If this keyword is set, read compressed data.
  GZIP (input, logical)
    If this keyword is set, write compressed data.
  TEXT (input, logical)
    If this keyword is set, treat the file as a text file,
    transferring data line-by-line with formatted
    read/writes. Otherwise, transfer data via a buffer with
    unformatted read/writes of byte data.
  UNIX (input, logical)
    This keyword has an effect only when the TEXT keyword *is*
    set. When UNIX is set, the lines of text are written via
    unformatted writes terminated with a 10B character. Thus
    Unix-format files are produced on all platforms.
  YIELD (input, logical)
    If this keyword is set, yield control regularly throughout the
    transfer.

Side Effects


  A new file is created.
###########################################################################
  This software is provided subject to the following conditions:
  1. NIWA makes no representations or warranties regarding the
    accuracy of the software, the use to which the software may
    be put or the results to be obtained from the use of the
    software. Accordingly NIWA accepts no liability for any loss
    or damage (whether direct of indirect) incurred by any person
    through the use of or reliance on the software.
  2. NIWA is to be acknowledged as the original author of the
    software where the software is used or presented in any form.
###########################################################################

Modification History


  Mark Hadfield, 1997-01:
    Written.
  Mark Hadfield, 1999-09:
    Added GZIP, GUNZIP & TEXT functionality.
  Mark Hadfield, 2000-08:
    With the move to version 5.4, removed BINARY keyword in calls
    to OPENR & OPENW. this should make the procedure portable to
    non-Windows platforms.
  Mark Hadfield, 2000-10:
    Worked around EOF bug in IDL 5.4 beta by changing EOF to
    MGH_EOF (which see).
  Mark Hadfield, 2000-11:
    EOF bug fixed in IDL 5.4 final so MGH_EOF changed back to
    EOF.
  Mark Hadfield, 2001-07:
    Updated for IDL 5.5.
  Mark Hadfield, 2002-11:
    Added YIELD keyword--yielding is done via an MGH_Waiter object.
  Mark Hadfield, 2003-01:
    Yielding is now turned on by default and is done via a call to
    widget_event.
  Mark Hadfield, 2005-02:
    Fixed bug: binary NOT operator used when the LOGICAL_PREDICATE
    compile option is in effect.



© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us