def GetStatus(self,directory,files=None,service=None):
        """ Scans through all files in direcotory,
        opens DB (if any), and returns dictionary (where filename is key)
        of files and their status

        - Returns dictionary where filename is key
        - Status can be:
            - ? : Not tracked
            - S : Synched, in DB and on FLICKR
            - A : Added, will be pushed on checkin
            - M : Modified locally, will push to flicker on checkin
            - D : Deleted locally, will remove from flickr on checkin
            - C : Complicated (different states depending on service)
        Dictionary has format
        d['service']    - Class object handling this file (None if not handled)
        d['status']     - ?/S/A/M/D/C
        - Hash never computed here
        
        Also returns DB dictionary, where filename is key"""
        logger.debug("GetStatus dir=%s" %(directory))

        db=self._loadDB(directory)

        # Get file stats
        filedict=self._findFiles(directory,files)

        logger.debug("Found %d files in dir"%(len(filedict.keys())))
        logger.debug("DB has %d files"%(len(db.keys())))

        # Now go through each file and see if in dictionary, compare mtimes
        keys=filedict.keys()
        keys.sort()
        for fn in keys:
            if fn in db:
                filedict[fn]['status']=self._computeStatus(db[fn],service)
                # Only Set the modify flag if the current
                # file was actually synched in the first place
                if filedict[fn]['mtime'] > db[fn]['mtime']:
                    # Compute a new hash
                    newhash=self._hashfile(os.path.join(directory,fn))
                    for srv in db[fn]['services']:
                        if db[fn]['services'][srv]['status']\
                                ==self.ST_UPTODATE:
                            # Only if the hash changed do we update
                            if newhash!=db[fn]['hash']:
                                filedict[fn]['status']=self.ST_MODIFIED
                                db[fn]['services'][srv]['status']\
                                        =self.ST_MODIFIED
                            else:
                                # Hash didn't change, let's update the mtime
                                # so we don't have to hash again
                                db[fn]['mtime']=filedict[fn]['mtime']
                                self._saveDB(directory,db)
                # Recompute since status might have changed
                filedict[fn]['status']=self._computeStatus(db[fn],service)
            else:
                filedict[fn]['status']=self.ST_UNTRACKED


        return filedict,db