C# 클래스 ClamAV.Managed.ClamEngine

Encapsulates an instance of the ClamAV engine.
상속: IClamEngine
파일 보기 프로젝트 열기: rmuch/ClamAV.Managed 1 사용 예제들

공개 메소드들

메소드 설명
ClamEngine ( ) : System

Creates a new ClamAV engine instance.

ClamEngine ( bool debug ) : System

Creates a new ClamAV engine instance.

Dispose ( ) : void

Free the unmanaged resource associated with this ClamAV engine instance.

LoadDatabase ( ) : void

Load databases from the default hardcoded path using standard options.

LoadDatabase ( LoadOptions options ) : void

Load databases from the default hardcoded path using custom options.

LoadDatabase ( string path ) : void

Load databases from a custom path using standard options.

LoadDatabase ( string path, LoadOptions options ) : void

Loads a database file or directory into the engine.

ScanDirectory ( string directoryPath, FileScannedCallback fileScannedCallback ) : void

Scan a directory for viruses with default scan options, recursing into subdirectories.

ScanDirectory ( string directoryPath, ScanOptions scanOptions, FileScannedCallback fileScannedCallback ) : void

Scan a directory for viruses with custom scan options, recursing into subdirectories.

ScanDirectory ( string directoryPath, ScanOptions scanOptions, FileScannedCallback fileScannedCallback, bool recurse, int maxDepth ) : void

Scan a directory for viruses, optionally recursing into subdirectories.

ScanFile ( string filePath, ScanOptions scanOptions, string &virusName ) : ScanResult

Scans a file for viruses.

ScanFile ( string filePath, string &virusName ) : ScanResult

Scans a file for viruses with the default scan options.

보호된 메소드들

메소드 설명
Dispose ( bool b ) : void

Free the unmanaged resource associated with this ClamAV engine instance.

비공개 메소드들

메소드 설명
EngineGetNum ( UnsafeNativeMethods setting ) : long

Get a numerical settings value.

EngineGetStr ( UnsafeNativeMethods setting ) : string

Get a string setting value.

EngineSetNum ( UnsafeNativeMethods setting, long value ) : void

Set a numerical setting value.

EngineSetStr ( UnsafeNativeMethods setting, string value ) : void

Set a string setting value.

ErrorString ( int error ) : string

Returns the description string of a ClamAV error code.

Initialize ( ) : void

Global initialization method to load the ClamAV library into the process. This method should be called once during the lifetime of a host process.

UnmarshalString ( IntPtr ptr ) : string

Unmarshals a pointer to an ANSI string value.

메소드 상세

ClamEngine() 공개 메소드

Creates a new ClamAV engine instance.
public ClamEngine ( ) : System
리턴 System

ClamEngine() 공개 메소드

Creates a new ClamAV engine instance.
public ClamEngine ( bool debug ) : System
debug bool Enable verbose ClamAV debug logging.
리턴 System

Dispose() 공개 메소드

Free the unmanaged resource associated with this ClamAV engine instance.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Free the unmanaged resource associated with this ClamAV engine instance.
protected Dispose ( bool b ) : void
b bool Whether the dispose method has been called from the finalizer.
리턴 void

LoadDatabase() 공개 메소드

Load databases from the default hardcoded path using standard options.
public LoadDatabase ( ) : void
리턴 void

LoadDatabase() 공개 메소드

Load databases from the default hardcoded path using custom options.
public LoadDatabase ( LoadOptions options ) : void
options LoadOptions Options with which to load the database.
리턴 void

LoadDatabase() 공개 메소드

Load databases from a custom path using standard options.
public LoadDatabase ( string path ) : void
path string Path to the database file or a directory containing database files.
리턴 void

LoadDatabase() 공개 메소드

Loads a database file or directory into the engine.
public LoadDatabase ( string path, LoadOptions options ) : void
path string Path to the database file or a directory containing database files.
options LoadOptions Options with which to load the database.
리턴 void

ScanDirectory() 공개 메소드

Scan a directory for viruses with default scan options, recursing into subdirectories.
public ScanDirectory ( string directoryPath, FileScannedCallback fileScannedCallback ) : void
directoryPath string Path to scan.
fileScannedCallback FileScannedCallback Called after a file has been scanned.
리턴 void

ScanDirectory() 공개 메소드

Scan a directory for viruses with custom scan options, recursing into subdirectories.
public ScanDirectory ( string directoryPath, ScanOptions scanOptions, FileScannedCallback fileScannedCallback ) : void
directoryPath string Path to scan.
scanOptions ScanOptions Scan options.
fileScannedCallback FileScannedCallback Called after a file has been scanned.
리턴 void

ScanDirectory() 공개 메소드

Scan a directory for viruses, optionally recursing into subdirectories.
public ScanDirectory ( string directoryPath, ScanOptions scanOptions, FileScannedCallback fileScannedCallback, bool recurse, int maxDepth ) : void
directoryPath string Path to scan.
scanOptions ScanOptions Scan options.
fileScannedCallback FileScannedCallback Called after a file has been scanned.
recurse bool Enter subdirectories.
maxDepth int Maximum depth to scan, or zero for unlimited.
리턴 void

ScanFile() 공개 메소드

Scans a file for viruses.
public ScanFile ( string filePath, ScanOptions scanOptions, string &virusName ) : ScanResult
filePath string Path to the file to be scanned.
scanOptions ScanOptions Scan options.
virusName string Output variable for the virus name, if detected.
리턴 ScanResult

ScanFile() 공개 메소드

Scans a file for viruses with the default scan options.
public ScanFile ( string filePath, string &virusName ) : ScanResult
filePath string Path to the file to be scanned.
virusName string Output variable for the virus name, if detected.
리턴 ScanResult