diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-01-27 21:24:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-01-27 21:24:00 +0100 |
commit | fa502d65e5e502ef6a26eeb246267ced520ed139 (patch) | |
tree | 01a1ec7a640311bf0af1ae1996675cae04000810 /tex/context/base/l-file.lua | |
parent | 33fc570519a96f61b586ade8e4833326caaeaf7a (diff) | |
download | context-fa502d65e5e502ef6a26eeb246267ced520ed139.tar.gz |
beta 2013.01.27 21:24
Diffstat (limited to 'tex/context/base/l-file.lua')
-rw-r--r-- | tex/context/base/l-file.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua index 2a3d6991e..e91eeac4c 100644 --- a/tex/context/base/l-file.lua +++ b/tex/context/base/l-file.lua @@ -11,6 +11,24 @@ if not modules then modules = { } end modules ['l-file'] = { file = file or { } local file = file +if not lfs then + lfs = { + getcurrentdir = function() + return "." + end, + attributes = function() + return nil + end, + isfile = function(name) + local f = io.open(name,'rb') + if f then + f:close() + return true + end + end, + } +end + local insert, concat = table.insert, table.concat local match = string.match local lpegmatch = lpeg.match |