Rename widget sumup to countfiles
This commit is contained in:
parent
a67b52c226
commit
4d4e639ecf
|
@ -9,15 +9,15 @@ local setmetatable = setmetatable
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- Sum up: provides a number of files in several directories
|
-- countfiles: provides a number of files in several directories
|
||||||
-- @warg.paths a table with the paths which should be checked
|
-- @warg.paths a table with the paths which should be checked
|
||||||
-- @warg.pattern a global regex to match files (Default: match all)
|
-- @warg.pattern a global regex to match files (Default: match all)
|
||||||
-- use posix-egrep style instead of the default (less familar) emacs regex
|
-- use posix-egrep style instead of the default (less familiar) emacs regex
|
||||||
|
|
||||||
-- Be carefull with directories, who contains a mass of files.
|
-- Be carefull with directories, who contains a mass of files.
|
||||||
-- "find" is usally fast, but will also produce delays, if the inodes get to big.
|
-- "find" is usally fast, but will also produce delays, if the inodes get to big.
|
||||||
-- So if you want to count your music library, you may want to use locate/updatedb instead.
|
-- So if you want to count your music library, you may want to use locate/updatedb instead.
|
||||||
module("vicious.widgets.sumup")
|
module("vicious.contrib.countfiles")
|
||||||
|
|
||||||
|
|
||||||
-- {{{ Sum up widget type
|
-- {{{ Sum up widget type
|
||||||
|
@ -39,7 +39,7 @@ local function worker(format, warg)
|
||||||
lines = lines + 1
|
lines = lines + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
store[key] = lines
|
store[key] = (store[key] or 0) + lines
|
||||||
|
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
Loading…
Reference in New Issue