php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-04 13:49 UTC] sander@php.net
Use glob() and your imagination.
 [2002-06-04 14:04 UTC] mfischer@php.net
glob() is only in CVS so far.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 26 23:01:30 2024 UTC