Example #1
0
 def run(self): #Overwrite run() method, put what you want the thread do here
     fileDirectory = []
     fileDirectory.append((self.disk, 1,0)) 
     handle = DB.initDB(self.disk[0:1])
     maxCount = self.getSubfolder(handle, fileDirectory)
     print maxCount
     DB.setFileTableCount(self.disk[0:1], maxCount)
     DB.closeDB(handle)
Example #2
0
    if action == DELETED or action == RENAMED_FROM_SOMETHING:
        DB.deleteAbsolutePathFromFileTable(DBhandle[1], tableCount, filename)
                
FILE_LIST_DIRECTORY = 0x0001 
CREATED = 0x1
DELETED = 0x2
RENAMED_FROM_SOMETHING = 0x4
RENAMED_TO_SOMETHING = 0x5

#logIndex = 0
#names = locals()
#names["memStore_1"] = []

diskStore = []
#logger = DB.initLog(logIndex)
DBhandle = DB.initDB()      

path_to_watch = osBase.getDiskDriver()

for path in path_to_watch:
    if os.path.exists(path):
        diskNotify = DiskNotify(path)
        diskNotify.start()


#thread.start_new_thread(storeToFileTable, (DBhandle[1], names["memStore_%d" % (logIndex-1)]))

    #logIndex = 1
     #logger = DB.initLog(logIndex)
     #thread.start_new_thread(storeToFileTable, (DBhandle[1], names["memStore_%d" % (logIndex-1)]))
#                print full_filename + "%%%%%%" + str(action)