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
 [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: Sat Jul 27 00:01:30 2024 UTC