GW2RegisterExportFile
GW2RegisterExportFile 함수는 지정된 파일 경로를 세션에 등록하며, 내보낸 데이터는 해당 파일에 저장됩니다. 이 함수를 사용하면 해당 세션에 대해 Export Process Mode가 활성화됩니다.
- C++
- C#
- Java
- Python
- JavaScript
개요
GW2RegisterExportFile 함수는 exportFilePath가 가리키는 문자열 이름의 파일을 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 열거형을 int로 변환하여 반환합니다. 오류가 발생한 경우 값은 음수가 됩니다. 0은 성공을 나타냅니다. 자세한 내용은 API Overview/Return types를 참조하세요.
NullPointerException 예외는 exportFilePath가 null이거나 비어 있는 경우 발생합니다.
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.
개요
지정된 세션에 대해 내보낼 파일을 등록합니다. 내보내기 파일은 세션의 run_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.
"""
반환값
gw_return_object (glasswall.GwReturnObj): 함수 호출 결과를 나타내는 'status' 속성과 세션 정수인 'session' 속성을 가진 GwReturnObj 인스턴스입니다. output_file이 None인 경우(메모리 모드), 파일 내용과 파일 크기를 포함하는 'buffer' 및 'buffer_length'도 포함됩니다.
status 속성은 정수 GW2_RetStatus enum 값입니다. 음수는 실패를 나타냅니다.
개요
이 함수는 지정된 세션에 지정된 내보내기 파일을 등록합니다
/**
* @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 값을 반환합니다. 음수는 실패를 나타냅니다.