summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fs.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/fs.lua b/lib/fs.lua
index 48364a6..88df9f1 100644
--- a/lib/fs.lua
+++ b/lib/fs.lua
@@ -85,6 +85,19 @@ lines[#lines + 1] = c end
return lines
end
+--will interate over a ipairs(table) and make it into a string to be used by write_file
+function ipairs_string ( t )
+ for a,b in ipairs(t) do
+ if a == 1 then
+ c = b
+ else
+ c = c .. "\n" .. b
+ end
+ end
+ --add a friendly \n for EOF
+ c = c .. "\n"
+ return c
+end
-- write a string to a file !! MM-will replace file contents
@@ -111,6 +124,8 @@ function write_line_file ( path, str )
end
+
+
-- iterator function for finding dir entries matching filespec (what)
-- starting at where, or currentdir if not specified.
-- Finds regexes, not fileglobs