[TYPO3-dev] Translation, L10N and LLXML

Jigal van Hemert jigal at xs4all.nl
Sun Apr 18 08:59:47 CEST 2010


Lars Houmark wrote:
> Patch posted to the core list, after looking into the issue, considering 
> the best solution, and adjusting the current one (was the best imho) 
> with minor improvements.

Great that this is getting fixed!

Two questions:

1. Is there anything against using iterators? It makes the code so much 
simpler and moves the handling of recursive stuff to the PHP core.

if ($recursively === FALSE) {
	$iterator = new RegexIterator(new IteratorIterator(new 
DirectoryIterator($pathname)), '/[^.]+/', RegexIterator::MATCH);
	// regex filters '.' and '..'
} else {
	$iterator = new RecursiveIteratorIterator(new 
RecursiveDirectoryIterator($pathname), 
RecursiveIteratorIterator::SELF_FIRST);
}
	
foreach($iterator as $fileObject) {
	// handle chmod/chgrp
}


2. If only OS other than WIN is getting the chmod/chgrp treatment, why 
should we traverse the directory tree at all on Windows?

-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh




More information about the TYPO3-dev mailing list