You are here: C++ API > File Parser API > Container File Parsers
Close
dtSearch Text Retrieval Engine Programmer's Reference
Container File Parsers

A container file parser provides an interface to enumerate the documents within a container.

A container file parser is essentially the same as a document file parser except that it must support the following additional functions: getCount, getInfoByName, getInfoByIndex, extractToMem, extractToFile. Containers should be able to extract either to memory or to a file, although only the latter is required. 

To identify a file parser as a container file parser, set the flag viIsContainer in dtsViewerInfo.flags. 

A container cannot return text. The readTextBlock function is never called if a file parser has viIsContainer set. 

Container parsers should handle situations in which the information supplied is incorrect. For example, the name may designate a file that is no longer stored in the container.

Container File Names

When a document that is stored inside a container is retrieved in a search, the filename that is returned describes the path to the document through the containers in which it is found. The path consists of the name of the disk file where the container is stored followed by one or more strings identifying items to be extracted from a container. Each string consists of an ordinal (in hex), a comma, the type id of the container (also hex), a | delimiter, and a text identifier for the item. The strings are delimited with >. For example, if "smith.doc" is stored as the fourth item in "c:\zips\november.zip", the filename would be: 

c:\zips\november.zip>4,df|smith.doc

Copyright (c) 1995-2021 dtSearch Corp. All rights reserved.