method: path.local.ensure

 ensure that an args-joined path exists (by default as
            a file). if you specify a keyword argument 'dir=True'
            then the path is forced to be a directory path.
        
    def ensure(self, *args, **kwargs):

origin: path.local

where:

function source:

def ensure(self, *args, **kwargs):
    """ ensure that an args-joined path exists (by default as
            a file). if you specify a keyword argument 'dir=True'
            then the path is forced to be a directory path.
        """
    p = self.join(*args)
    if kwargs.get('dir', 0):
        return p._ensuredirs()
    else:
        p.dirpath()._ensuredirs()
        if not p.check(file=1):
            p.write("")
        return p

call sites:

called in /home/johnny/projects/merlinux/py/dist/py/apigen/source/testing/test_browser.py

traceback path.local.ensure.0

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.1

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.2

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/testing/test_rest.py

traceback path.local.ensure.3

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.4

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/testing/test_rest.py

traceback path.local.ensure.5

called in /home/johnny/projects/merlinux/py/dist/py/documentation/test_conftest.py

traceback path.local.ensure.6

called in /home/johnny/projects/merlinux/py/dist/py/apigen/source/testing/test_browser.py

traceback path.local.ensure.7

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.8

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/genrest.py

traceback path.local.ensure.9

called in /home/johnny/projects/merlinux/py/dist/py/apigen/source/testing/test_html.py

traceback path.local.ensure.10

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.11

called in /home/johnny/projects/merlinux/py/dist/py/apigen/source/testing/test_html.py

traceback path.local.ensure.12

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/genrest.py

traceback path.local.ensure.13

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.14

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/testing/test_rest.py

traceback path.local.ensure.15

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.16

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/genrest.py

traceback path.local.ensure.17

called in /home/johnny/projects/merlinux/py/dist/py/documentation/test_conftest.py

traceback path.local.ensure.18

called in /home/johnny/projects/merlinux/py/dist/py/apigen/rest/genrest.py

traceback path.local.ensure.19

called in /home/johnny/projects/merlinux/py/dist/py/test/config.py

traceback path.local.ensure.20