<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_dir(self, path):
 """ import contents of a directory """


        def visit_path(arg, dirname, names):
            for name in names:
                fpath = os.path.join(dirname, name)
                new_path = fpath[len(path):]
                if os.path.isfile(fpath):
                    content = open(fpath, "rb").read()
                    self.touch(new_path, content)
                else:
                    self.mkdir(new_path)

        os.path.walk(path, visit_path, None)