KeyView 23.2

# Extract Subfiles

You can iterate over subfile information using the `subfiles` method. Each element returned by the iterator contains information about the subfile, and a method to let you extract it if you want to:

    auto myinput = keyview::io::InputFile{ std::string("InputFile.zip") };
    for (const auto& subfile : KV.subfiles(myinput))
    {
        auto subfile_path = subfile.rawname();
        auto myoutput = keyview::io::OutputFile{ subfile_path };
        subfile.extract(myoutput);
    }

NOTE: This very simple example does not account for folders within container files. For a more complete example, see the extract sample program.

NOTE: The `subfiles` method actually returns an instance of the `keyview::Container` class, defined in `Keyview_Container.hpp` (see The Container Class for more information). This provides access to information about the container, and access to each subfile. Please note that the container maintains a reference to the input file, and so cannot be used after the input file has been destroyed.

Copyright 2016-2023 Open Text
Version 23.2 | Last updated March 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 KeyView 23.2

Topic Title: Extract Subfiles