GW2DetermineFileTypeAndReport
GW2DetermineFileTypeAndReport 関数は、指定されたファイルのファイルタイプを判定し、レポートを生成します。これはセッションには関連しません。
- C++
- C#
- Java
- Python
- JavaScript
#include "glasswall.core2.api.h"
ft_t GW2DetermineFileTypeAndReport(const char *inputFileBuffer, size_t inputLength, const char *report)
パラメーター
inputFileBuffer この関数で処理されるファイルを含むメモリ位置。
inputLength inputFileBuffer の長さ(バイト単位)
report レポートの書き込み先となるプレーンテキストファイルのパスです。ファイルが存在しない場合は作成されます。
戻り値
判定されたファイルタイプを示す列挙型 ft_t。ファイルタイプを判定できない場合は ft_unknown が返されます。
概要
戻り値
概要
public int GW2DetermineFileTypeAndReport(byte[] fileBuffer, String reportFilePath) throws GlasswallException, NullPointerException
public int GW2DetermineFileTypeAndReport(byte[] fileBuffer, int length, String reportFilePath) throws GlasswallException, NullPointerException
説明
The GW2DetermineFileTypeAndReport function determines the file type of the file held in the byte array fileBuffer and writes out a summary XML report to the path specified in reportFilePath. The length of the fileBuffer may optionally be specified.
戻り値
GW2DetermineFileTypeAndReport 関数は、判定されたファイルタイプを示す整数を返します。列挙定数の一覧は、C ソースのヘッダーファイル filetype.h にあります。戻り値が 0 の場合、ファイルタイプを判定できないことを示します。
成功した場合、XML レポートが reportFilePath で指定されたパスに書き込まれます。
NullPointerException 例外は、fileBuffer または reportFilePath バッファが null または空の場合にスローされます。
GlasswallException 例外は、fileBuffer を取得できない場合、または reportFilePath を UTF-8 に変換できなかった場合にスローされます。
概要
戻り値
概要
戻り値