GW2RegisterExportFile

Prev Next

The GW2RegisterExportFile function registers a specified file path to session - the exported data will be placed in that file. Using this function activates the Export Process Mode for the session.

Synopsis

The GW2RegisterExportFile function registers the file whose name is the string pointed to by exportFilePath with the session denoted by session. The exported data will be placed in that file. Using this function activates the Export Process Mode for the session.

#include "glasswall.core2.api.h"
int GW2RegisterExportFile(
    Session session,
    const char *exportFilePath);

Returns

Returns an integer GW2_RetStatus enum value. Negative numbers indicate a failure.

Synopsis

public int RegisterExportFile(
    int session,
    string exportFilePath)

Returns

Returns an integer GW2_RetStatus enum value. Negative numbers indicate a failure.

Synopsis

import com.glasswall.core2javabridge.*;

public int GW2RegisterExportFile(int session, String exportFilePath) throws GlasswallException, NullPointerException

(Deprecated)
public int GW2RegisterExportFile(int session, byte[] exportFilePath) throws GlasswallException, NullPointerException

Note:

The GW2RegisterExportFile function parameters have been updated to use String in place of byte[]. The original function has been deprecated.

Returns

The GW2RegisterExportFile function returns a GW2_RetStatus enumeration converted to int. The value will be negative if an error occurred. 0 indicates success.

Please refer to API Overview for Return Types and their details.

A NullPointerException exception will be thrown if exportFilePath is null or empty.

A GlasswallException exception will be thrown if session is invalid, if the exportFilePath could not be retrieved, or if the exportFilePath could not be converted to UTF-8.

Synopsis

Registers a file to be exported for the given session. The export file will be created during the session's run_session call.

def register_export(self, session: int, output_file: Optional[str] = None):
    """ Registers a file to be exported for the given session. The export file will be created during the session's run_session call.

    Args:
        session (int): The session integer.
        output_file (Optional[str]): Default None. The file path where the export will be written. None exports the file in memory.

    Returns:
        gw_return_object (glasswall.GwReturnObj): A GwReturnObj instance with the attribute 'status' indicating the result of the function call and 'session', the session integer. If output_file is None (memory mode), 'buffer', and 'buffer_length' are included containing the file content and file size.
    """

Returns

gw_return_object (glasswall.GwReturnObj): A GwReturnObj instance with the attribute status indicating the result of the function call and session, the session integer. If output_file is None (memory mode), buffer, and buffer_length are included containing the file content and file size.

Synopsis

This function registers a specified export file with a specified session.

/**
* @param {number} session The ID of the session.
* @param {string} exportFilePath The path of the file to be registered.
*/

GW2RegisterExportFile(session, exportFilePath)

Returns

Returns an integer GW2_RetStatus enum value. Negative numbers indicate a failure.