ConnectorLib C++ 23.3

# Create a Document

With ConnectorLib C++, you can create a new document using the `createDocInfo(...)` functions on an instance of the `DocInfoBuilder` class. You can create the `DocInfoBuilder` from any `ConnectorTask` object.

           DocInfoBuilder builder = task.docInfoBuilder();

           DocInfo docInfo = builder.createDocInfo(
                "http://www.example.com/testDocument.doc",
                "testDocument.doc", true);

The arguments for this method are:

           createDocInfo(
                const std::string& reference,
                const std::string& filename,
                bool ownFile)

The reference uniquely identifies the document and is used for the `DREREFERENCE` if the document is ingested. The file `testDocument.doc` forms the content of the document. If the document is sent to CFS, KeyView extracts metadata and content from the file and adds this information to the document. The final argument indicates whether `testDocument.doc` is a temporary file owned by the connector. In the example, this argument is passed the value `true`, which means that ConnectorLib C++ automatically deletes the file when it is no longer needed.

Copyright 2022 Open Text
Version 23.3 | Last updated June 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL ConnectorLib C++ 23.3

Topic Title: Create a Document