View Single Post
Old 04-27-2023, 11:31 AM   #109
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
I want to show an icon if the data folder contains a file named todo.???? (might be ToDo.txt, TODO.EML, todo.stky, etc).

Something like extra_file_exists("todo.*") might be useful.

BR
The changed has_extra_files() that takes an optional regexp does what you want, returning a count of files that match the pattern. For example:
Code:
program:
	if has_extra_files('^todo\.') then "icon.png" fi
chaley is offline   Reply With Quote