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)
            dir = 'A'
        for sname in self.listdir(sourcedir):
            if self._shutdown_flusher:
        # 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')
            path = os.path.join('journal',file)
            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):
            # ... and delete the directory