GW2RegisterImportFile
GW2RegisterImportFile 関数は、インターチェンジファイルへのファイルパスを登録します(エクスポート処理モードの出力として生成されるファイル)。この関数を使用すると、そのセッションで Import Process Mode が有効になります。
- C++
- C#
- Java
- Python
- JavaScript
概要
GW2RegisterImportFile 関数は、importFilePath が指す名前のファイルを、インポート対象のファイルとして登録します。このファイルはインターチェンジファイル形式に準拠している必要があります。この関数を使用すると、そのセッションで Import Process Mode が有効になります。
#include "glasswall.core2.api.h"
int GW2RegisterImportFile(Session session, const char *importFilePath);
戻り値
整数の GW2_RetStatus 列挙値を返します。負の数は失敗を示します。
概要
public int RegisterImportFile(
int session,
string importFilePath)
戻り値
整数の GW2_RetStatus 列挙値を返します。負の数は失敗を示します。
概要
import com.glasswall.core2javabridge.*;
public int GW2RegisterImportFile(int session, String importFilePath) throws GlasswallException, NullPointerException
(deprecated)
public int GW2RegisterImportFile(int session, byte[] importFilePath) throws GlasswallException, NullPointerException
注
The GW2RegisterImportFile function parameters have been updated to use String in place of byte[]. The original function has been deprecated.
戻り値
GW2RegisterImportFile 関数は、GW2_RetStatus 列挙型を int に変換して返します。エラーが発生した場合、値は負になります。0 は成功を示します。詳細については、API Overview/Return types を参照してください。
NullPointerException 例外は、importFilePath が null または空の場合にスローされます。
GlasswallException 例外は、session が無効な場合、importFilePath を取得できなかった場合、または importFilePath を UTF-8 に変換できなかった場合にスローされます。
概要
指定されたセッションに対して、インポート対象の .zip ファイルを登録します。構築されたファイルは、セッションの run_session 呼び出し中に作成されます。
def register_import(self, session: int, input_file: Union[str, bytes, bytearray, io.BytesIO]):
""" Registers a .zip file to be imported for the given session. The constructed file will be created during the session's run_session call.
Args:
session (int): The session integer.
input_file (Union[str, bytes, bytearray, io.BytesIO]): The input import file path or bytes.
Returns:
gw_return_object (glasswall.GwReturnObj): A GwReturnObj instance with the attribute 'status' indicating the result of the function call. 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' を持つ GwReturnObj インスタンスです。output_file が None(メモリモード)の場合、ファイル内容とファイルサイズを含む 'buffer' および 'buffer_length' が含まれます。
status 属性は整数の GW2_RetStatus enum 値です。負の数は失敗を示します。
概要
この関数は、指定されたセッションに対してインポートファイルパスを登録します。
/**
* @param {number} session The ID of the session.
* @param {string} importFilePath The path of the file to be registered.
*/
GW2RegisterImportFile(session, importFilePath)
戻り値
整数の GW2_RetStatus 列挙値を返します。負の数は失敗を示します。