GW2RegisterExportFile
GW2RegisterExportFile फ़ंक्शन session के लिए एक निर्दिष्ट file path पंजीकृत करता है - exported data उस file में रखा जाएगा। इस फ़ंक्शन का उपयोग करने से session के लिए Export Process Mode सक्रिय हो जाता है।
- C++
- C#
- Java
- Python
- JavaScript
सारांश
GW2RegisterExportFile फ़ंक्शन उस file को, जिसका नाम exportFilePath द्वारा इंगित string है, session. द्वारा निरूपित session के साथ पंजीकृत करता है। Exported data उस file में रखा जाएगा। इस फ़ंक्शन का उपयोग करने से session के लिए Export Process Mode सक्रिय हो जाता है।
#include "glasswall.core2.api.h"
int GW2RegisterExportFile(
Session session,
const char *exportFilePath);
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।
सारांश
public int RegisterExportFile(
int session,
string exportFilePath)
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।
सारांश
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
नोट
The GW2RegisterExportFile function parameters have been updated to use String in place of byte[]. The original function has been deprecated.
रिटर्न
GW2RegisterExportFile फ़ंक्शन GW2_RetStatus enumeration को int में परिवर्तित करके लौटाता है। यदि कोई त्रुटि हुई हो, तो मान नकारात्मक होगा। 0 सफलता को दर्शाता है। विवरण के लिए API Overview/Return types देखें।
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.
सारांश
दिए गए session के लिए export की जाने वाली फ़ाइल को register करता है। export फ़ाइल session के 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.
"""
रिटर्न
gw_return_object (glasswall.GwReturnObj): एक GwReturnObj instance जिसमें attribute 'status' फ़ंक्शन call के परिणाम को दर्शाता है और 'session', session integer है। यदि output_file None है (memory mode), तो 'buffer' और 'buffer_length' शामिल होते हैं, जिनमें file content और file size होता है।
status attribute एक integer GW2_RetStatus enum value है। Negative numbers विफलता को दर्शाते हैं।
सारांश
यह फ़ंक्शन एक निर्दिष्ट export फ़ाइल को एक निर्दिष्ट session के साथ register करता है
/**
* @param {number} session The ID of the session.
* @param {string} exportFilePath The path of the file to be registered.
*/
GW2RegisterExportFile(session, exportFilePath)
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।