Resolve the path to absolute from current working directory

@param {string} params
@returns {string}
517326
function $path(params) {
    if (params == null) {
        return params;
    }
    if (typeof params === 'string') {
        const path = require('path');
        if (path.isAbsolute(params)) {
            return params;
        }

        return path.resolve(process.cwd(), params);
    }
    throw new Error('$path expects a string');
}
890337
function getorigPath(filePath, base) {
    var extName = path.extname(filePath);
    var pt = path.resolve(base, filePath);
    if (!extName) pt += '.js';
    return pt;
}
237321
function setAbsolutePath(file) {
    file.absolutePath = path.resolve(process.cwd(), file.fullPath);
    return file.absolutePath;
  }
1155953
function getAbsPath(...relativePathPartsToRoot) {
    const { resolve, join } = path;

    return fs.existsSync(relativePathPartsToRoot[0])
      ? resolve(join(...relativePathPartsToRoot))
      : resolve(join(getRepoRootAbsPath(), ...relativePathPartsToRoot));
  }
1172751
function getAppDir() {
    var fileRepo = args._[1] ? path.resolve(args._[1]) : undefined;
    return fileRepo && fs.existsSync(fileRepo) ? fileRepo : 0;
}
677179
function createAbsolutePath(name) {
        return pathModule.resolve(
          basePath,
          name
            ? config.output.filename.replace(/\[name]/g, name)
            : config.output.filename
        );
      }
982377
function toAbsolute(_href, dir, outdir) {
    if (isExternal(_href) || isDataURI(_href)) {
        return _href;
    }

    outdir = outdir == undefined? dir : outdir;

    _href = normalize(_href);
    dir = normalize(dir);
    outdir = normalize(outdir);

    // Path "_href" inside the base folder
    var hrefInRoot = normalize(path.join(dir, _href));
    if (_href[0] == '/') {
        hrefInRoot = normalize(_href.slice(1));
    }

    // Make it relative to output
    _href = path.relative(outdir, hrefInRoot);

    // Normalize windows paths
    _href = normalize(_href);

    return _href;
}
826391
function getFilePathRelativeToAppRoot (pPath) {
    // go to meow-blog directory
    var projectBaseDirectory = path.resolve(__dirname, '..');

    if (projectBaseDirectory.indexOf('node_modules') !== -1) {
        // from meow-blog, go up to node_modules, then go to base directory
        projectBaseDirectory = path.resolve(projectBaseDirectory, '..', '..');
    }

    return path.resolve(projectBaseDirectory, pPath);
}
64106
function resolveModulePath(relativeToFile, modulePath) {
  if (!isLocalModule(modulePath)) {
    return modulePath;
  }

  const alias = getModuleResolverAlias();
  const matched = _.find(_.keys(alias), k => _.startsWith(modulePath, k));

  let res = null;
  if (matched) {
    const resolveTo = alias[matched];
    const relativePath = modulePath.replace(new RegExp(`^${matched}`), '').replace(/^\//, '');
    res = paths.map(resolveTo, relativePath);
    // res = utils.joinPath(utils.getProjectRoot(), resolveTo, relativePath);
  } else {
    res = paths.join(path.dirname(relativeToFile), modulePath);
  }

  let relPath = res.replace(paths.getProjectRoot(), '').replace(/^\/?/, '');
  if (vio.dirExists(relPath)) {
    // if import from a folder, then resolve to index.js
    relPath = paths.join(relPath, 'index');
  }
  return relPath;
}
1260123
function (params) {
	var i = params.length, dependencies = [];
	while (i--) {
		dependencies[i] = `"${ params[i].name }"`;
	}

	return dependencies.join(", ");
}
981584
function toResolvePaths(paths) {
	return paths.map(function (_path) {
		if (_path.indexOf('*') >= 0) return path.resolve(_path); // wildcard path
		return resolve.sync(path.resolve(_path));                // maybe resolve of main path in package.json
	});
}
557891
def get_absolute_path(*args):
    """"""
    directory = os.path.dirname(os.path.abspath(__file__))
    return os.path.join(directory, *args)
467013
private Set<String> getPaths(Map<String, String> params) {

        Set<String> result = Sets.newHashSet();
        String paths = params.get(CmsPublishOptions.PARAM_FILES);
        if (paths != null) {
            result.addAll(CmsStringUtil.splitAsList(paths, "|"));
        }
        return result;
    }
1345976
function resolve(val, i, isPath) {
			val = val.replace('~', '');
			return Promise.resolve(System.normalize(val))
					.then(function(normalized) {
						return System.locate({name: normalized, metadata: {}});
					})
					.then(function(address) {
						if (isPath) {
							options.includePaths.push(
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
						} else {
							var originalRelativePath      = path.relative(
									path.dirname(file.path),
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
							var originalRelativePathArray = originalRelativePath.split(path.sep);

							replacements[i] = path.posix?
									path.posix.join.apply(this, originalRelativePathArray):
									path.normalize(originalRelativePath).replace(/\\/g, '/').replace('//', '/');
						}
					});
		}
210139
function resolve (from, to) {

    if (isRemoteFile(from)) {

        if (!/\/$/.test(from)) {
            from += '/';
        }

        return url.resolve(from, to);
    } else if (isRemoteFile(to)) {
        return to;
    } else {
        return path.resolve(from, to);
    }
}
380
function generatePath(path = "/", params = {}) {
  return path === "/" ? path : compilePath(path)(params, { pretty: true });
}
420869
function resolveFilesInParams(params, files) {
	var fileIds = Object.keys(files || {});

	var fileCount = fileIds.length;
	if (fileCount === 0) {
		return;
	}

	// scan all members for files, and collect children

	function addMembers(list, obj) {
		var keys = Object.keys(obj || {});

		for (var i = 0; i < keys.length; i++) {
			list.push({
				owner: obj,
				key: keys[i],
				value: obj[keys[i]]
			});
		}
	}

	var list = [];

	addMembers(list, params);

	for (var i = 0; i < list.length && fileCount > 0; i++) {
		var member = list[i];

		if (!member.value) {
			continue;
		}

		var type = typeof member.value;

		if (type === 'object') {
			// append children to the end of the list

			addMembers(list, member.value);
		} else if (type === 'string' && files[member.value]) {
			// file found for this property, so assign it

			var file = files[member.value];

			logger.verbose('Accepted file', '"' + file.partName + '":', file.fileName);

			member.owner[member.key] = file;

			delete files[member.value];
			fileCount -= 1;
		}
	}
}