mirror of
https://github.com/dobin/avred
synced 2026-06-08 13:54:13 +00:00
13 lines
338 B
Python
13 lines
338 B
Python
import os
|
|
|
|
# Check if file gets detected by the scanner
|
|
def scanFileOnly(filepath, scanner):
|
|
data = None
|
|
with open(filepath, 'rb') as file:
|
|
data = file.read()
|
|
detected = scanner.scan(data, os.path.basename(filepath))
|
|
if detected:
|
|
print(f"File is detected")
|
|
else:
|
|
print(f"File is not detected")
|