function BackupMigrateUnitTest::countFiles in Backup and Migrate 5
2 calls to BackupMigrateUnitTest::countFiles()
File
- tests/
BackupMigrateUnitTest.test, line 737
Class
- BackupMigrateUnitTest
- Unit tests for Backup and Migrate module.
Code
function countFiles($dir) {
$out = 0;
if ($res = opendir($dir)) {
// read all files and sort them by modified time
while ($file = readdir($res)) {
if ($file != '.' && $file != '..' && $file != 'test.txt') {
$out++;
}
}
}
return $out;
}