Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/d/i/DirectoryStorage-1.1.21/LocalFilesystem.py   DirectoryStorage(Download)
        else:
            dir = 'A'
        for sname in self.listdir(sourcedir):
            if self._shutdown_flusher:
                return
        # always in snapshot mode, therefore these files are being
        # flushed into the B directory
        jc = [x for x in self.listdir('journal')]
        jc.sort() # alphabetic sort order will give us jounal replay order too
 
            if len(jc)!=1:
                raise RecoveryError('journal not empty, and journal/replica.tar exists')
            if [x for x in self.listdir('B')]:
                raise RecoveryError('B not empty, and journal/replica.tar exists')
            self.flush_replica()
            path = os.path.join('journal',file)
            paths.append(path)
            for file in self.listdir(path):
                self.relocations[file] = path
        # Asynchonously move good files into the main directory
            # ... delete its contents
            path = os.path.join('journal',file)
            for file in self.listdir(path):
                self.unlink(os.path.join(path,file))
            # ... and delete the directory