PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File System » File_Find » Bug #5503

shell matching not working as expected?

Details

Submitted2005-09-23 16:01 UTC
Frommerrittd at dhcmc dot com
Assignedtechtonik
StatusClosed
PackageFile_Find
PHP Version5.0.5
OSWin 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