[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[52120] scummvm/trunk/common/fs.cpp (and r52121)

peres peres at scummvm.org
Tue Aug 17 03:46:17 CEST 2010


> I need it for the following pseudocode:
> 
>  archive->listMatchedMembers(list, "rooms/*");
>  foreach it in (list) {
>    executeScript(it->getName() + "/default.lua");
>  }


Assuming that a single pattern does the job, this is how your code should be written:

archive->listMatchingMembers(list, "rooms/*/default.lua");
foreach it in (list) {
	executeScript->(it->getName());
}

listMatchingMembers should match your GLOB pattern and find the files into the subdirectories, provided you created the archive with the correct depth.

Regards,
peres



More information about the Scummvm-devel mailing list