|
Posted by Toby A Inkster on 08/01/07 20:54
J. Frank Parnell wrote:
> Works great, thanks! Could you explain 'bit of a cheat'? Am I going to
> get caught? :)
It calls two external programs in the background: "find" and "sort". You
will get caught if you use a non-Linux web host, as it may not have these
installed. Even other Unix flavours may cause problems as it specifically
relies on the GNU version of "find". (Non-Linux machines usually have the
BSD version of "find".)
> find_dirs_with_jpegs () seems faster
It probably will be: particularly for larger directories. "find" and
"sort" are written in C by some very smart people who have optimised them
very well.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 42 days, 24 min.]
demiblog 0.2.2 Released
http://tobyinkster.co.uk/blog/2007/07/29/demiblog-0.2.2/
Navigation:
[Reply to this message]
|