def _source_handler_files_in_dir(
        self, root_dir, scan_dir, allow_handlers_outside_root_dir):

        # We build a map from resource to handler code assuming that there's
        # only one path from root_dir to scan_dir and it can be obtained by
        # comparing realpath of them.

        # Here we cannot use abspath. See
        # https://bugs.webkit.org/show_bug.cgi?id=31603

        convert = _create_path_to_resource_converter(root_dir)
        scan_realpath = os.path.realpath(scan_dir)
        root_realpath = os.path.realpath(root_dir)
        for path in _enumerate_handler_file_paths(scan_realpath):
            if (not allow_handlers_outside_root_dir and
                (not os.path.realpath(path).startswith(root_realpath))):
                self._logger.debug(
                    'Canonical path of %s is not under root directory' %
                    path)
                continue
            try:
                handler_suite = _source_handler_file(open(path).read())
            except DispatchException, e:
                self._source_warnings.append('%s: %s' % (path, e))
                continue
            resource = convert(path)
            if resource is None:
                self._logger.debug(
                    'Path to resource conversion on %s failed' % path)
            else:
                self._handler_suite_map[convert(path)] = handler_suite


# vi:sts=4 sw=4 et
Sets the host and port that this process listens on.
dataset/ETHPy150Open google/pywebsocket/mod_pywebsocket/dispatch.py/Dispatcher._source_handler_files_in_dir--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver_multiprocess.py/ChildProcess.SetHostPort