php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #22525 extension to the dir class
Submitted: 2003-03-03 16:04 UTC Modified: 2013-10-28 21:17 UTC
From: bonebakker at attbi dot com Assigned: krakjoe (profile)
Status: Closed Package: *General Issues
PHP Version: 4.2.3 OS: solaris
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: bonebakker at attbi dot com
New email:
PHP Version: OS:

 

 [2003-03-03 16:04 UTC] bonebakker at attbi dot com
it would be nice of the dir class is extended with a 'sort' method.

The 'sort' method accepts a single flag, indicating the mode by which it needs to sort.

eg:

$dir->sort('name')  : sort A-Za-z, based on names
$dir->sort('ext')   : sort A-Za-z, based on ext
$dir->sort('date')  : sort based on timestamp
$dir->sort('cdate') : sort based on creation date
$dir->sort('adate') : sort based on access date
$dir->sort('size')  : sort based on file size

preceding any call with '-' makes the order descending
+ or nothing defaults to ascending.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-28 21:17 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: krakjoe
 [2013-10-28 21:17 UTC] krakjoe@php.net
http://php.net/DirectoryIterator has existed for some time, it can help you to do such things.

Closing the request.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 06:01:27 2024 UTC