summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-05-27 01:24:47 +0000
committerNorbert Preining <preining@logic.at>2013-05-27 01:24:47 +0000
commit04a64779a0d27806141d9b0f6363b27807fba240 (patch)
tree9f734437a02d6c613113c25bb6f92ac9fed39f06 /Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
parent14b2656fed04defad4cdc723d7a1de0fd2d21414 (diff)
lualibs update 5/27
git-svn-id: svn://tug.org/texlive/trunk@30700 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua21
1 files changed, 19 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
index 358b028300c..fa28547b71f 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-basic-merged.lua
-- parent file : lualibs-basic.lua
--- merge date : Sat May 18 12:25:19 2013
+-- merge date : Thu May 23 21:13:25 2013
do -- begin closure to overcome local limits and interference
@@ -2814,7 +2814,7 @@ elseif not lfs.isfile then
end
end
local insert,concat=table.insert,table.concat
-local match,find=string.match,string.find
+local match,find,gmatch=string.match,string.find,string.gmatch
local lpegmatch=lpeg.match
local getcurrentdir,attributes=lfs.currentdir,lfs.attributes
local checkedsplit=string.checkedsplit
@@ -2845,11 +2845,21 @@ local pattern=(noslashes^0*slashes)^0*(noperiod^1*period)^1*C(noperiod^1)*-1
local function suffixonly(name)
return name and lpegmatch(pattern,name) or ""
end
+local pattern=(noslashes^0*slashes)^0*noperiod^1*((period*C(noperiod^1))^1)*-1+Cc("")
+local function suffixesonly(name)
+ if name then
+ return lpegmatch(pattern,name)
+ else
+ return ""
+ end
+end
file.pathpart=pathpart
file.basename=basename
file.nameonly=nameonly
file.suffixonly=suffixonly
file.suffix=suffixonly
+file.suffixesonly=suffixesonly
+file.suffixes=suffixesonly
file.dirname=pathpart
file.extname=suffixonly
local drive=C(R("az","AZ"))*colon
@@ -3127,6 +3137,13 @@ function file.strip(name,dir)
return a~="" and a or name
end
end
+function lfs.mkdirs(path)
+ local full=""
+ for sub in gmatch(path,"(/*[^\\/]+)") do
+ full=full..sub
+ lfs.mkdir(full)
+ end
+end
end -- closure