Jump to content

[SOLVED] How to getNumFiles and open


photo

Recommended Posts

Posted

Dir is a class, you have to create an instance.

///...

		Dir directory = new Dir();
		if(directory.open(engine.getDataPath() + path)) {
			forloop(int i = 0; directory.getNumFiles()) {
				string name = basename(directory.getFileName(i));
				if(strrstr(name,".world") == -1) continue;
				names.append(replace(name,".world",""));
			}
			directory.close();
		}
		delete directory;
/// ...
Posted

thanks :)

 

That really help :)

 

[sOLVED]
×
×
  • Create New...