summaryrefslogtreecommitdiff
path: root/tex/context/base/file-res.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-04-01 12:15:05 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-04-01 12:15:05 +0200
commitd48764d88ac59aa9b0130f1049892296a3eb4684 (patch)
tree5b442ba162ab03943a24c482e0c4b32a311a6c38 /tex/context/base/file-res.lua
parentaab1c4e9206382c1a96d738fddabf3d98218f267 (diff)
downloadcontext-d48764d88ac59aa9b0130f1049892296a3eb4684.tar.gz
2015-04-01 12:02:00
Diffstat (limited to 'tex/context/base/file-res.lua')
-rw-r--r--tex/context/base/file-res.lua28
1 files changed, 18 insertions, 10 deletions
diff --git a/tex/context/base/file-res.lua b/tex/context/base/file-res.lua
index 78fdc3404..a1c4986b5 100644
--- a/tex/context/base/file-res.lua
+++ b/tex/context/base/file-res.lua
@@ -149,16 +149,24 @@ end
resolvers.getreadfilename = getreadfilename
-function commands.getreadfilename(scheme,path,name)
- context(getreadfilename(scheme,path,name))
-end
-
-- a name belonging to the run but also honoring qualified
-function commands.locfilename(name)
- context(getreadfilename("loc",".",name))
-end
+local implement = interfaces.implement
-function commands.doiflocfileelse(name)
- commands.doifelse(isfile(getreadfilename("loc",".",name)))
-end
+implement {
+ name = "getreadfilename",
+ actions = { getreadfilename, context },
+ arguments = { "string", "string", "string" }
+}
+
+implement {
+ name = "locfilename",
+ actions = { getreadfilename, context },
+ arguments = { "'loc'","'.'", "string" },
+}
+
+implement {
+ name = "doiflocfileelse",
+ actions = { getreadfilename, isfile, commands.doifelse },
+ arguments = { "'loc'","'.'", "string" },
+}