Home » File System » File_Find » Bug #5503
shell matching not working as expected?
Details
| Submitted | 2005-09-23 16:01 UTC |
|---|---|
| From | merrittd at dhcmc dot com |
| Assigned | techtonik |
| Status | Closed |
| Package | File_Find |
| PHP Version | 5.0.5 |
| OS | Win 2000 SP4 |
| Roadmaps | (Not assigned) |
Comments
[2005-09-23 16:01 UTC] merrittd at dhcmc dot com
Description:
------------
Not sure the shell pattern matching is working as expected. See the test script for a full description. Using File_Find 1.1.0 w/ PEAR 1.4.0 on PHP 5.0.5
Test script:
---------------
<?php
// have a directory of files:
//
// Copy of FileZilla Server.xml
// FileZilla Server.xml
// FileZilla Server.xml.2005_09_22_091500
// FileZilla Server.xml.2005_09_22_001500
// FileZilla Server.xml.2005_09_21_124500
// etc
//
// Matching 'FileZilla Server.xml.*'
require_once('File/Find.php');
$Match = 'FileZilla Server.xml' . '.*';
echo "Matching $Match\n";
$OldFiles = &File_Find::glob( $Match, '.', 'shell' );
print_r($OldFiles);
?>
Expected result:
----------------
FileZilla Server.xml.2005_09_22_091500
FileZilla Server.xml.2005_09_22_001500
FileZilla Server.xml.2005_09_21_124500
etc
Actual result:
--------------
Copy of FileZilla Server.xml
FileZilla Server.xml
FileZilla Server.xml.2005_09_22_091500
FileZilla Server.xml.2005_09_22_001500
FileZilla Server.xml.2005_09_21_124500
etc