Beispiel #1
0
    def checkFiles(self):
        if not self.__files:
            return

        info = QtCore.QFileInfo()

        for path, mtime in self.__files.iteritems():
            info.setFile(path)
            test_mtime = info.lastModified()
            if mtime != test_mtime:
                self.__files[path] = test_mtime
                LOGGER.debug("Log file modified: (%r) '%s'", test_mtime, path)
                self.fileChanged.emit(path)
Beispiel #2
0
    def addPath(self, path):
        if not path in self.__files:
            self.__files[path] = QtCore.QFileInfo(path).lastModified()

        if self.__files and not self.__timer.isActive():
            self.start()