OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

fileoprifcimpl.c.
It contains the functions for the file operations.
Return Type Method Summary
void CloseFile(void *filePtr)
             This function closes the file pointed by the file pointer.
INT32 GetFileLength(CHAR *fName)
             It will calculate the length of the file which is coming as argument and returns it .
CHAR InitResource()
             Assigns the funtions pointers in the Resource operation structure to appropriate functions.
CHAR IsEndOfFile(void *filePtr)
             This function finds out whether the file pointer has come to the end or not.
void* OpenAFile(CHAR *fileName, CHAR *mode)
             This function opens the file specified in the argument in the specified mode.
CHAR ReadALineFromFile(void *filePtr, StringBuffer *strBuf)
             This function reads a line from the file and stores it in the Stringbuffer.
CHAR* ReadFileContents(CHAR *fileName, INT32 *bufLen)
             It will return the contents of the file coming as the argument and returns NULL if it is not available.
   
Method Details

CloseFile()

void CloseFile(void *filePtr)

This function closes the file pointed by the file pointer.

Arguments:
1. File Pointer (IN).
Return type:
Nothing.
Bugs:
null

GetFileLength()

INT32 GetFileLength(CHAR *fName)

It will calculate the length of the file which is coming as argument and returns it .

Arguments:
1. File Name (IN).
Return type:
Returns the length of the file.
Bugs:
null

InitResource

CHAR InitResource()

Assigns the funtions pointers in the Resource operation structure to appropriate functions.

Arguments:
Nothing.
Return type:
the status of the operation.
Bugs:
null

IsEndOfFile()

CHAR IsEndOfFile(void *filePtr)

This function finds out whether the file pointer has come to the end or not.

Arguments:
1. File Pointer (IN).
Return type:
TRUE / FALSE.
Bugs:
null

OpenAFile()

void* OpenAFile(CHAR *fileName, CHAR *mode)

This function opens the file specified in the argument in the specified mode.

Arguments:
1. File Name (IN).
Return type:
File Pointer.
Bugs:
null

ReadALineFromFile()

CHAR ReadALineFromFile(void *filePtr, StringBuffer *strBuf)

This function reads a line from the file and stores it in the Stringbuffer.

Arguments:
1. File Pointer (IN).
2. StringBuffer (OUT).
Return type:
Exit Status.
Bugs:
null

ReadFileContents()

CHAR* ReadFileContents(CHAR *fileName, INT32 *bufLen)

It will return the contents of the file coming as the argument and returns NULL if it is not available.

Arguments:
1. File Name (IN).
2. File contents length (OIT).
Return type:
File Contents.
Bugs:
null


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

Copyright (c) 2009 ZOHO Corp. All Rights Reserved.