diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 15:48:23 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 15:48:23 +0000 |
commit | ae59e7f08b35ec98f2358b0d9526fbf822a32f01 (patch) | |
tree | ddcda801b80a1dcd3bae7ec25bf158a91af8958e /fs.lua | |
parent | 4dd2e0a349a51321a71415721072e848f2650f2b (diff) | |
download | acf-lib-ae59e7f08b35ec98f2358b0d9526fbf822a32f01.tar.bz2 acf-lib-ae59e7f08b35ec98f2358b0d9526fbf822a32f01.tar.xz |
Remove trailing whitespace
Diffstat (limited to 'fs.lua')
-rw-r--r-- | fs.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -127,7 +127,7 @@ function mymodule.read_file ( path ) end end --- Returns an array with the contents of a file, +-- Returns an array with the contents of a file, -- or nil and the error message function mymodule.read_file_as_array ( path ) local file, error = io.open(path or "") @@ -135,14 +135,14 @@ function mymodule.read_file_as_array ( path ) return nil, error end local f = {} - for line in file:lines() do + for line in file:lines() do table.insert ( f , line ) --sometimes you will see it like f[#f+1] = line end file:close() return f end - + -- write a string to a file, will replace file contents function mymodule.write_file ( path, str ) path = path or "" @@ -174,7 +174,7 @@ function mymodule.find_files_as_array ( what, where, follow, t ) where = where or posix.getcwd() what = what or ".*" t = t or {} - + local link if follow and mymodule.is_link(where) then link = posix.readlink(where) @@ -209,7 +209,7 @@ end function mymodule.find ( what, where, follow ) local t = mymodule.find_files_as_array ( what, where, follow ) local idx = 0 - return function () + return function () idx = idx + 1 return t[idx] end |