GW2RegisterExportFile
Ang function na GW2RegisterExportFile ay nagrerehistro ng tinukoy na file path sa session - ang na-export na data ay ilalagay sa file na iyon. Ang paggamit ng function na ito ay nag-a-activate ng Export Process Mode para sa session.
- C++
- C#
- Java
- Python
- JavaScript
Buod
Ang function na GW2RegisterExportFile ay nagrerehistro ng file na ang pangalan ay ang string na tinutukoy ng exportFilePath sa session na tinutukoy ng session. Ang na-export na data ay ilalagay sa file na iyon. Ang paggamit ng function na ito ay nag-a-activate ng Export Process Mode para sa session.
#include "glasswall.core2.api.h"
int GW2RegisterExportFile(
Session session,
const char *exportFilePath);
Ibinabalik
Nagbabalik ng integer na GW2_RetStatus enum value. Ang mga negatibong numero ay nagpapahiwatig ng pagkabigo.
Buod
public int RegisterExportFile(
int session,
string exportFilePath)
Ibinabalik
Nagbabalik ng integer na GW2_RetStatus enum value. Ang mga negatibong numero ay nagpapahiwatig ng pagkabigo.
Buod
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
Tandaan
Ang mga parameter ng function na GW2RegisterExportFile ay na-update upang gumamit ng String kapalit ng byte[]. Ang orihinal na function ay deprecated na.
Ibinabalik
Ang function na GW2RegisterExportFile ay nagbabalik ng GW2_RetStatus enumeration na kino-convert sa int. Magiging negatibo ang value kung may naganap na error. Ang 0 ay nagpapahiwatig ng tagumpay. Tingnan ang API Overview/Return types para sa mga detalye.
Isang NullPointerException exception ang ita-throw kung ang exportFilePath ay null o walang laman.
Isang GlasswallException exception ang ita-throw kung invalid ang session, kung hindi makuha ang exportFilePath, o kung hindi ma-convert sa UTF-8 ang exportFilePath.
Buod
Nagrerehistro ng file na ie-export para sa ibinigay na session. Gagawin ang export file habang isinasagawa ang run_session call ng session.
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.
"""
Ibinabalik
gw_return_object (glasswall.GwReturnObj): Isang instance ng GwReturnObj na may attribute na 'status' na nagsasaad ng resulta ng function call at 'session', ang integer ng session. Kung output_file ay None (memory mode), kasama ang 'buffer' at 'buffer_length' na naglalaman ng nilalaman ng file at laki ng file.
Ang status attribute ay isang integer na GW2_RetStatus enum value. Ang mga negatibong numero ay nagpapahiwatig ng failure.
Buod
Nirerehistro ng function na ito ang tinukoy na export file sa isang tinukoy na session
/**
* @param {number} session The ID of the session.
* @param {string} exportFilePath The path of the file to be registered.
*/
GW2RegisterExportFile(session, exportFilePath)
Ibinabalik
Nagbabalik ng integer na GW2_RetStatus enum value. Ang mga negatibong numero ay nagpapahiwatig ng pagkabigo.