monkey/infection_monitor/condition/files.py

13 lines
286 B
Python
Raw Normal View History

2015-08-30 15:27:35 +08:00
import os
from condition import MonitorCondition
__author__ = 'itamar'
class FilesExistCondition(MonitorCondition):
def __init__(self, file_name):
self._file_path = os.path.abspath(file_name)
def check_condition(self):
return os.path.isfile(self._file_path)