NSAPI Functions (in Alphabetical Order)
146
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
Example
/* Register the log_close function, passing it NULL */
/* to close *a log file when the server is */
/* restarted or shutdown. */
daemon_atrestart(log_close, NULL);
NSAPI_PUBLIC void log_close(void *parameter)
{
system_fclose(global_logfd);
}
F
fc_open
The fc_open function returns a pointer to
PRFileDesc
that refers to an open file
(fileName). The fileName must be the full pathname of an exisiting file. The file is
opened in Read Mode only. The application calling this function should not modify
the currency of the file pointed by the
PRFileDesc
* unless the
DUP_FILE_DESC
is
also passed to this function. In other words, the application (at minimum) should
not issue a read operation based on this pointer that would modify the currency for
the
PRFileDesc
*. If such a read operation is required (that may change the
currency for the
PRFileDesc
* ), then the application should call this function with
the argument
DUP_FILE_DESC
.
On a successful call to this function a valid pointer to PRFileDesc is returned and
the handle '
FcHdl
' is properly initialized. The size information for the file is stored
in the 'fileSize' member of the handle.
Syntax
PRFileDesc *fc_open(const char *fileName
,
FcHdl *hDl,PRUint32 flags
,
Session *sn, Request *rq
);
Returns
Pointer to PRFileDesc, NULL on failure
Parameters
const char *fileName
is the full path name of the file to be opened
FcHdl*hDl
is a valid pointer to a structure of type FcHdl
PRUint32
flags
can be 0 or DUP_FILE_DESC
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...