Did I find the right examples for you? yes no

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)
delete all files and directories under path 

        def delete_all_under(path, delete_top_dir = False):
    """ delete all files and directories under path """

    if not os.path.isdir(path):
        return
    
    files = os.listdir(path)

    for the_f in files:
        fullpath = os.path.join(path, the_f)
        if os.path.isfile(fullpath):
            new_f = os.remove
            __rmgeneric(fullpath, new_f)
        elif os.path.isdir(fullpath):
            delete_all_under(fullpath)
            new_f = os.rmdir
            __rmgeneric(fullpath, new_f)
    
    if delete_top_dir:
        os.rmdir(path)
        


src/g/m/gmvault-HEAD/src/gmv/test_utils.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-1.8.1-beta/src/gmv/test_utils.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-HEAD/src/gmvault_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)
        """
        storage_dir = '/tmp/gmail_bk'
        gmvault_utils.delete_all_under(storage_dir)
 
        gimap   = imap_utils.GIMAPFetcher('imap.gmail.com', 993, self.login, self.passwd)
        """
        storage_dir = '/tmp/gmail_bk'
        gmvault_utils.delete_all_under(storage_dir)
 
        gimap   = imap_utils.GIMAPFetcher('imap.gmail.com', 993, self.login, self.passwd)
        """
        storage_dir = '/tmp/gmail_bk'
        gmvault_utils.delete_all_under(storage_dir)
        gimap   = imap_utils.GIMAPFetcher('imap.gmail.com', 993, self.login, self.passwd)
        gstorer = gmvault.GmailStorer(storage_dir)
        """
        storage_dir = '/tmp/gmail_bk'
        gmvault_utils.delete_all_under(storage_dir)
        gimap   = imap_utils.GIMAPFetcher('imap.gmail.com', 993, self.login, self.passwd)
 

src/g/m/gmvault-HEAD/src/sandbox_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-HEAD/src/gmv/validation_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-HEAD/src/validation_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-HEAD/src/gmv_cmd_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)

src/g/m/gmvault-HEAD/src/gmvault_essential_tests.py   gmvault(Download)
        test_utils.diff_online_mailboxes(backuper, restorer)
 
        gmvault_utils.delete_all_under(gmvault_test_db_dir, delete_top_dir = True)
 
    def ztest_delete_gsync(self):

src/g/m/gmvault-1.8.1-beta/src/gmv/validation_tests.py   gmvault(Download)
def delete_db_dir(a_db_dir):
    """
       delete the db directory
    """
    gmvault_utils.delete_all_under(a_db_dir, delete_top_dir = True)