Reply to Re: deleting all the files in a directory

Your name:

Reply:


Posted by Andy Hassall on 02/14/06 01:35

On Mon, 13 Feb 2006 22:47:26 +0100, Ewoud Dronkert
<firstname@lastname.net.invalid> wrote:

>Andy Hassall wrote:
>> if (is_file("$dir/$file"))
>
>You're potentially missing (symbolic) links

Missing, or including? symlinks to files return true from is_file() if their
target is a file, so yes, that should probably have a && !is_link() condition
as well, depending on what the OP really wants deleted.

>and files larger than int-size.

Hm, didn't know about that one. http://bugs.php.net/bug.php?id=27792

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация