php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12035 Function dir with match
Submitted: 2001-07-11 03:24 UTC Modified: 2002-02-09 23:42 UTC
From: jpolaino at euro-red dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: Win
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jpolaino at euro-red dot com
New email:
PHP Version: OS:

 

 [2001-07-11 03:24 UTC] jpolaino at euro-red dot com
dir (string directory) is a very poor function.

I'd like a funcion where I can request:

dir("path/directory/with/$Match", $Order=BY_NAME, $Reverse=0);

where $Match allow ?, *, [1-5], [a-z]

and $Order allow BY_NAME, BY_DATE, BY_SIZE

It is posible?
Tomorrow, please?

Too I sugest a function $Array = ArrayDir($Dir);

Perdon for my bad english

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-11 04:00 UTC] zak@php.net
dir() is a very simple function that is designed to easily allow developer to build functions like you describe.

You can build this function by using a combination of ereg() and sort (or usort or rsort).

For help on doing this, please contact the PHP General mailing list.

Note: The developers may not agree with me -- I will leave this bug set to analyzed to encourage others to look at it.
 [2002-02-09 23:42 UTC] jimw@php.net
use PEAR's File::Find.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 22:01:27 2025 UTC