diff options
-rw-r--r-- | src/luarocks/path.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua index b63eaa43..f2d02ded 100644 --- a/src/luarocks/path.lua +++ b/src/luarocks/path.lua | |||
@@ -81,6 +81,20 @@ function rockspec_file(name, version, rocks_dir) | |||
81 | return dir.path(rocks_dir or cfg.rocks_dir, name, version, name.."-"..version..".rockspec") | 81 | return dir.path(rocks_dir or cfg.rocks_dir, name, version, name.."-"..version..".rockspec") |
82 | end | 82 | end |
83 | 83 | ||
84 | --- Get the local filename of the rock_manifest file of an installed rock. | ||
85 | -- @param name string: The package name. | ||
86 | -- @param version string: The package version. | ||
87 | -- @param rocks_dir string or nil: If given, specifies the local repository to use. | ||
88 | -- @return string: The resulting path -- does not guarantee that | ||
89 | -- the package (and by extension, the file) exists. | ||
90 | function rock_manifest_file(name, version, rocks_dir) | ||
91 | assert(type(name) == "string") | ||
92 | assert(type(version) == "string") | ||
93 | assert(not rocks_dir or type(rocks_dir) == "string") | ||
94 | |||
95 | return dir.path(rocks_dir or cfg.rocks_dir, name, version, "rock_manifest") | ||
96 | end | ||
97 | |||
84 | --- Get the local installation directory for C libraries of a package. | 98 | --- Get the local installation directory for C libraries of a package. |
85 | -- @param name string: The package name. | 99 | -- @param name string: The package name. |
86 | -- @param version string: The package version. | 100 | -- @param version string: The package version. |