comparison core/src/luan/modules/mmake.luan @ 629:35dde32c02ab 0.15

change String.matches()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 18 Jan 2016 23:07:52 -0700
parents 9767da72545b
children e387e4021afe
comparison
equal deleted inserted replaced
628:6510de302f95 629:35dde32c02ab
26 local function mmake(dir) 26 local function mmake(dir)
27 local javas = {} 27 local javas = {}
28 local dirs = {} 28 local dirs = {}
29 for _, file in ipairs(dir.children()) do 29 for _, file in ipairs(dir.children()) do
30 local name = file.name() 30 local name = file.name()
31 if String.matches(name,[[.*\.java]]) then 31 if String.matches(name,[[\.java$]]) then
32 javas[#javas+1] = String.sub(name,1,-6) 32 javas[#javas+1] = String.sub(name,1,-6)
33 end 33 end
34 if file.is_directory() and mmake(file) then 34 if file.is_directory() and mmake(file) then
35 dirs[#dirs+1] = name 35 dirs[#dirs+1] = name
36 end 36 end