toPath
builtins.toPath
Primop
Docs pulled from | This Revision | about 6 hours ago
Nix manual
Takes 1 arguments
s
Noogle detected
Detected Type
toPath :: String -> Path
Implementation
This function is implemented in c++ and is part of the native nix runtime.
static void prim_toPath(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
NixStringContext context;
auto path =
state.coerceToPath(pos, *args[0], context, "while evaluating the first argument passed to builtins.toPath");
v.mkString(path.path.abs(), context, state.mem);
}