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

All Samples(51)  |  Call(42)  |  Derive(0)  |  Import(9)
Create all the empty directories under 'base_dir' needed to put 'files'
there.

'base_dir' is just the a name of a directory which doesn't necessarily
exist yet; 'files' is a list of filenames to be interpreted relative to
'base_dir'.  'base_dir' + the directory portion of every file in 'files'
will be created if it doesn't already exist.  'mode', 'verbose' and
'dry_run' flags are as for 'mkpath()'.

        def create_tree(base_dir, files, mode=0777, verbose=1, dry_run=0):
    """Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the a name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    """
    # First get the list of directories to create
    need_dir = {}
    for file in files:
        need_dir[os.path.join(base_dir, os.path.dirname(file))] = 1
    need_dirs = need_dir.keys()
    need_dirs.sort()

    # Now create them
    for dir in need_dirs:
        mkpath(dir, mode, verbose=verbose, dry_run=dry_run)
        


src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Backup/20120727105608/AAAPackageDev/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Backup/20120706164234/AAAPackageDev/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Backup/20120520162633/AAAPackageDev/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Backup/20120426035411/PowerShell/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Backup/20120331054222/AAAPackageDev/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Packages/PowershellUtils/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Packages/PowerShell/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/c/h/Chocolatey-Packages-HEAD/mwrock-TfsDesktop/tools/sublime/Packages/AAAPackageDev/setup.py   Chocolatey-Packages(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/s/u/SublimeText2-Config-HEAD/Packages/AAAPackageDev/setup.py   SublimeText2-Config(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

src/s/u/Sublime-Rails-Settings-HEAD/VintageEx/setup.py   Sublime-Rails-Settings(Download)
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)
 
        # And walk over the list of files, either making a hard link (if

  1 | 2 | 3 | 4 | 5  Next