Retrieve from the parent pom the path to the modules of the project
771578
private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException {
        FilePath pathToModuleRoot = mavenBuild.getModuleRoot();
        FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null));
        return pathToPom.act(new MavenModulesExtractor());
    }
61992
def get_module_data_path(modname, relpath=None, attr_name='DATAPATH'):
    """"""
    datapath = getattr(sys.modules[modname], attr_name, '')
    if datapath:
        return datapath
    else:
        datapath = get_module_path(modname)
        parentdir = osp.join(datapath, osp.pardir)
        if osp.isfile(parentdir):
            # Parent directory is not a directory but the 'library.zip' file:
            # this is either a py2exe or a cx_Freeze distribution
            datapath = osp.abspath(osp.join(osp.join(parentdir, osp.pardir),
                                            modname))
        if relpath is not None:
            datapath = osp.abspath(osp.join(datapath, relpath))
        return datapath
884851
def path(self):
        
        if self.parent is None:
            return "/"
        else:
            return os.path.join(self.parent.path, self.name)
1362742
def _package_path(name):
    
    loader = pkgutil.get_loader(name)
    if loader is None or name == '__main__':
        return None

    if hasattr(loader, 'get_filename'):
        filepath = loader.get_filename(name)
    else:
        # Fall back to importing the specified module.
        __import__(name)
        filepath = sys.modules[name].__file__

    return os.path.dirname(os.path.abspath(filepath))
889640
function walkModules(dir, done) {

  var results = [];

  fs.readdir(dir, function(err, list) {
    if (err) return done(err);
    var pending = list.length;
    if (!pending) return done(null, results);

    list.forEach(function(file) {
      file = dir + path.sep + file;

      fs.stat(file, function(err, stat) {
        if (stat && stat.isDirectory()) {

          if (file.indexOf('node_modules') > -1) {
            walkModules(file, function(err, res) {
              results = results.concat(res);
              if (!--pending) done(null, results);
            });
          }
          else {
            if (!--pending) done(null, results);
          }

        } else {

          if (file.slice(-12) === 'package.json') {
            var parts = file.split(path.sep);
            if (parts[parts.length-3] === 'node_modules') {
              results.push(file);
            }
          }
          
          if (!--pending) done(null, results);
        }
      });
    });
  });
}
1009286
def get_project_source_path(path: str) -> str:
    

    path = environ.paths.clean(path)

    if not path.endswith('cauldron.json'):
        return os.path.join(path, 'cauldron.json')

    return path
205697
function getProjectRootDirectory() {
  // From the current directory, check if parent directories have a package.json file and if it contains
  // a reference to the @myrmex/core node_module
  let cwd = process.cwd();
  let packageJson;
  let found = false;

  do {
    try {
      packageJson = require(path.join(cwd, 'package.json'));
      if ((packageJson.dependencies && packageJson.dependencies['@myrmex/core'])
        || (packageJson.devDependencies && packageJson.devDependencies['@myrmex/core'])) {
        found = true;
      } else {
        cwd = path.dirname(cwd);
      }
    } catch (e) {
      cwd = path.dirname(cwd);
    }
  } while (cwd !== path.dirname(cwd) && !found);
  if (found) {
    return cwd;
  }
  return false;
}
1062719
function getParentPath(moduleMeta, options) {
  var referrer = moduleMeta.referrer;
  return (referrer && moduleMeta !== referrer) ? referrer.path : options.baseUrl;
}
200
def find_module(modpath):
    """"""
    module_path = modpath.replace('.', '/') + '.py'
    init_path = modpath.replace('.', '/') + '/__init__.py'
    for root_path in sys.path:
        path = os.path.join(root_path, module_path)
        if os.path.isfile(path):
            return path
        path = os.path.join(root_path, init_path)
        if os.path.isfile(path):
            return path
310462
def path(self) -> str:
        """"""
        return os.path.join(self.project_path, self.project.name)
543544
function getCompiledChildModuleDocsPath(moduleName) {
    let rootPath = c.rootPath;
    if (process.cwd() !== c.rootPath) {
        rootPath = path.join(process.cwd(), c.rootPath);
    }
    const childModuleRootPath = path.join(rootPath, c.dependenciesPath, moduleName),
            cmc = config.get(childModuleRootPath),
            childCompiledDocs = path.join(childModuleRootPath, cmc.webroot, cmc.latestVersionPath, '**/*.html');
    return childCompiledDocs;
}
571308
private static void setParentModuleProperties(ComponentDto componentDto, PathAwareVisitor.Path<ComponentDtoHolder> path) {
    componentDto.setProjectUuid(path.root().getDto().uuid());

    ComponentDto parentModule = from(path.getCurrentPath())
      .filter(ParentModulePathElement.INSTANCE)
      .first()
      .get()
      .getElement().getDto();
    componentDto.setUuidPath(formatUuidPathFromParent(path.parent().getDto()));
    componentDto.setRootUuid(parentModule.uuid());
    componentDto.setModuleUuid(parentModule.uuid());
    componentDto.setModuleUuidPath(parentModule.moduleUuidPath());

  }
1087059
function( path ) {
		var parts = path.split( rpathsplit ), ns = munit.ns, assert;

		// Grep for nested path module
		munit.each( parts, function( part ) {
			if ( assert = ns[ part ] ) {
				ns = assert.ns;
			}
			else {
				throw new munit.AssertionError( "Module path not found '" + path + "'", munit._getModule );
			}
		});

		return assert;
	}
567415
private String createPomPath(String relativePath, String moduleName) {
        if (!moduleName.contains(".xml")) {
            // Inside the parent pom, the reference is to the pom.xml file
            return relativePath + "/" + POM_NAME;
        }
        // There is a reference to another xml file, which is not the pom.
        String dirName = relativePath.substring(0, relativePath.indexOf("/"));
        return dirName + "/" + moduleName;
    }
313327
def getpackagepath():
    
    moduleDirectory = os.path.dirname(__file__)
    packagePath = os.path.dirname(__file__) + "/../"

    return packagePath
784181
protected Path getModuleJarPath(ModuleId moduleId) {
        Path moduleJarPath = rootDir.resolve(moduleId + ".jar");
        return moduleJarPath;
    }
227585
function findProjectRoot(currentPath) {
  var result = undefined;

  try {
    var packageStats = lstatSync(path.join(currentPath, 'package.json'));

    if (packageStats.isFile()) {
      result = currentPath;
    }
  } catch (error) {
    if (currentPath !== path.resolve('/')) {
      result = findProjectRoot(path.join(currentPath, '..'));
    }
  }

  return result;
}