Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/exists_c.html
Дата изменения: Sat Dec 17 06:09:02 2005 Дата индексирования: Mon Apr 11 00:02:02 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п р п р п р п р п р п р п р п р п р п р п р п р п р п |
Determine whether a file exists.
None.
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- fname I Name of the file in question. The function returns the value SPICETRUE if the file exists, SPICEFALSE otherwise.
fname is the name of the file in question. This may be a system name, e.g. "DISK:[USER.SUB1.SUB2]DATA.DAT" "\usr\dir1\dir2\data.dat" or a logical name, e.g. "EPHEMERIS" "DATA$DIR:SAMPLE.DAT"
The function returns the value SPICETRUE if the file exists, SPICEFALSE otherwise.
None.
Uses the f2c I/O libraries to implement the existence test.
The following code fragment illustrates the use of exists_c. if ( exists_c ( file ) ) { update ( file ); } else { setmsg_c ( "Input file does not exist." ); sigerr_c ( "FILENOTFOUND" ); return; }
None.
1) If the input name is blank, the error SPICE(BLANKFILENAME) will be signalled. (This test is currently unimplemented.) 2) If an error occurs during the execution existence test, the error SPICE(INQUIREFAILED) is signalled.
None.
K.R. Gehringer (JPL) H.A. Neilan (JPL) I.M. Underwood (JPL)
None.
-CSPICE Version 1.1.0, 08-FEB-1998 (NJB) References to C2F_CreateStr_Sig were removed; code was cleaned up accordingly. String checks are now done using the macro CHKFSTR_VAL. -CSPICE Version 1.0.0, 25-OCT-1997 (NJB) Based on SPICELIB Version 2.1.0, 4-MAR-1996 (KRG)
does the file exist