Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Make symlink and all dirs leading up to it.
OSError 17 (file exists) will be ignored.
If overwrite, existing symlink at `link` will be overwritten.

        def make_symlink(target, link, overwrite=False):
    """
    Make symlink and all dirs leading up to it.
    OSError 17 (file exists) will be ignored.
    If overwrite, existing symlink at `link` will be overwritten.
    """
    target = syspath(target)
    link = syspath(link)
    dirs = os.path.split(link)[0]
    if dirs:
        safe_make_dirs(dirs)
    try:        
        os.symlink(target, link)
    except OSError as e:
        if e.errno == 17:
            if overwrite and os.path.islink(link):
                os.unlink(link)
                os.symlink(target, link)
        else:
            raise        
        


src/h/u/humblebee-1.101/humblebee/renaming.py   humblebee(Download)
from .util import samefile
from .util import prune_dirs
from .util import make_symlink
from .util import safe_rename
from .dbguy import TVDatabase
    def move_episode(self, ep, force=True):
        oldfile = ep.path()
        newfile = self.naming_scheme.full_path(ep, root=self.destdir)
        make_symlink(oldfile, newfile, overwrite=True)
 
            safe_make_dirs(vpath)
        else:
            make_symlink(rpath, vpath)
 
def make_symlinkfs(rootdir, destdir, naming_scheme='friendly'):

src/h/u/humblebee-1.101/humblebee/importer.py   humblebee(Download)
from .util import syspath
from .util import safe_make_dirs
from .util import make_symlink
from .util import samefile
from .dirscanner import get_episodes