1if not modules then modules = { } end modules ['data-bin'] = {
2 version = 1.001,
3 comment = "companion to luat-lib.mkiv",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files"
7}
8
9local resolvers = resolvers
10local methodhandler = resolvers.methodhandler
11
12local notfound = resolvers.loaders.notfound
13
14function resolvers.findbinfile(filename,filetype)
15 return methodhandler('finders',filename,filetype)
16end
17
18local function openbinfile(filename)
19 return methodhandler('loaders',filename)
20end
21
22resolvers.openbinfile = openbinfile
23
24function resolvers.loadbinfile(filename,filetype)
25 local fname = methodhandler('finders',filename,filetype)
26 if fname and fname ~= "" then
27 return openbinfile(fname)
28 else
29 return notfound()
30 end
31end
32
33local notfound = resolvers.cleaners.notfound
34
35function resolvers.cleanupbinfile(filename)
36 local fname = methodhandler('finders',filename)
37 if fname and fname ~= "" then
38 return methodhandler('cleaners',fname)
39 else
40 return notfound()
41 end
42end
43 |