|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #17086 A command to retrieve the number of files in a dir /w regex
Submitted: 2002-05-07 21:13 UTC Modified: 2002-06-04 14:04 UTC
From: jeroen at vogelpoel dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.2.0 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jeroen at vogelpoel dot com
New email:
PHP Version: OS:


 [2002-05-07 21:13 UTC] jeroen at vogelpoel dot com
IMHO, it would be handy to have a command that returns the number of files in a directory. What would be a good idea to add to this is regex support, so you can only list files with specific extensions or such. Another handy option would be the ability to exclude directories from the count, including . and .. by using a boolean value.

In order to further illustrate it, take a look at how I think the command should look like

int num_files ( string directory, string pattern , bool hide_dirs )

Returns the number of files in [directory] matching [pattern]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-04 13:49 UTC]
Use glob() and your imagination.
 [2002-06-04 14:04 UTC]
glob() is only in CVS so far.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 18:01:31 2024 UTC