<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/mkfinfo.c">
<Name>LQT_MakeFileInfo</Name>
<Class>Database/Update, Database/Documents
<Purpose>
<P>Creates a t_FileInfo structure to describe the given FileName.
This routine should only be used if you are going to add the
given FileName to the given lq-text Database db; to get a
FileInfo describing a file already in the index,
use LQT_NameToFID and LQT_FIDToFileInfo.
<Returns>
<P>If the file is not already in the database, a new FID is allocated,
and a newly malloc'd t_FileInfo object is returned, complete with
a stdio FILE pointer already opened, either as a file or as a pipe,
depending on the file type and filter table;
it is the caller's responsibility to call LQT_DestroyFileInfo to
free the memory and close the stdio stream.</P>
<P>On error, or if the file is already in the database and has not
changed since it was last indexed, a warning is issued
and a NULL pointer is returned.</P>
<Errors>
If the file can't be found, or can't be opened, a warning is
produced.
<SeeAlso>
LQT_DestroyFileInfo
LQT_NameToFID
LQT_FIDToFileInfo
LQT_GetFilterType
LQT_MakeInput
</Function>
<Decl>
API t_FileInfo *
LQT_MakeFileInfo(db, FileName)
    t_LQTEXT_Database *db;
    char *FileName;
</Decl>
</Entry>
