aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/path.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/path.lua')
-rw-r--r--src/luarocks/path.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 8a56233f..7a569169 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -97,6 +97,19 @@ function path.rock_manifest_file(name, version, tree)
97 return dir.path(path.rocks_dir(tree), name, version, "rock_manifest") 97 return dir.path(path.rocks_dir(tree), name, version, "rock_manifest")
98end 98end
99 99
100--- Get the local filename of the rock_namespace file of an installed rock.
101-- @param name string: The package name (without a namespace).
102-- @param version string: The package version.
103-- @param tree string or nil: If given, specifies the local tree to use.
104-- @return string: The resulting path -- does not guarantee that
105-- the package (and by extension, the file) exists.
106function path.rock_namespace_file(name, version, tree)
107 assert(type(name) == "string")
108 assert(type(version) == "string")
109 tree = tree or cfg.root_dir
110 return dir.path(path.rocks_dir(tree), name, version, "rock_namespace")
111end
112
100--- Get the local installation directory for C libraries of a package. 113--- Get the local installation directory for C libraries of a package.
101-- @param name string: The package name. 114-- @param name string: The package name.
102-- @param version string: The package version. 115-- @param version string: The package version.