KeyView 24.2

# fpGetMainFileInfo()

This function determines whether a file is a container file—that is, whether it contains subfiles—and should be extracted further.

## Syntax

    int (pascal *fpGetMainFileInfo) (
        void               *pFile,
        KVMainFileInfo     *fileInfo);

## Arguments

`pFile` | The identifier of the file. This is a file handle returned from fpOpenFile().
`fileInfo` | A pointer to the structure KVMainFileInfo. This structure contains information about the file.

## Returns

- If the file information is retrieved, the return value is `KVERR_Success`.

- If the file information is not retrieved, the return value is an error code.

## Discussion

- After the file information is retrieved, call fpFreeStruct() to free the memory allocated by this function.
- If the file is a container (`fileInfo->numSubFiles` is non-zero), call fpGetSubFileInfo() and fpExtractSubFile() for each subfile.
- If the file is not a container (`fileInfo->numSubFiles` is `0`) and contains text (`fileInfo->infoFlag` is set to `KVMainFileInfoFlag_HasContent)`, pass the file directly to the conversion functions.

## Example

    KVMainFileInfo   fileInfo    = NULL;
    if( (error=extractInterface->fpGetMainFileInfo(pFile,&fileInfo)))
    {
        /* Free result object allocated in fileInfo */
        extractInterface->fpFreeStruct(pFile,fileInfo);
        fileInfo = NULL;
    }

Copyright 1997-2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.2

Topic Title: fpGetMainFileInfo()