diff options
author | Marius <mariausol@gmail.com> | 2012-09-04 19:20:28 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-09-04 19:20:28 +0300 |
commit | edd2b22c9d92fd77d47b5fb6517a230470ec7038 (patch) | |
tree | c4d5386d55a53d423cfd6cb4157b6bda2813d8c7 /tex/context/base/l-dir.lua | |
parent | e0f42793d14b7571ae6221a15e691d28b3f76d8f (diff) | |
download | context-edd2b22c9d92fd77d47b5fb6517a230470ec7038.tar.gz |
beta 2012.09.04 18:08
Diffstat (limited to 'tex/context/base/l-dir.lua')
-rw-r--r-- | tex/context/base/l-dir.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/l-dir.lua b/tex/context/base/l-dir.lua index 71de3114e..3deb660ce 100644 --- a/tex/context/base/l-dir.lua +++ b/tex/context/base/l-dir.lua @@ -25,6 +25,24 @@ local isdir = lfs.isdir local isfile = lfs.isfile local currentdir = lfs.currentdir +-- in case we load outside luatex + +if not isdir then + function isdir(name) + local a = attributes(name) + return a and a.mode == "directory" + end + lfs.isdir = isdir +end + +if not isfile then + function isfile(name) + local a = attributes(name) + return a and a.mode == "file" + end + lfs.isfile = isfile +end + -- handy function dir.current() |