Here is my test example:
#include <iostream>
#include<physfs.h>
int main()
{
std::cout<<"begin"<<std::endl;
PHYSFS_init(NULL);
if(PHYSFS_mount("myzip.zip",0,1))
{
char **rc = PHYSFS_enumerateFiles("folder");
char **i;
if(!*rc)
{
std::cout<<"Can't print file list"<<std::endl;
std::cout<<PHYSFS_getLastError()<<std::endl;
}
for (i = rc; *i != NULL; i++)
{
std::cout<<"We've got"<<*i<<std::endl;
}
PHYSFS_freeList(rc);
}
else
{
std::cout<<"Can't add search path"<<std::endl;
std::cout<<PHYSFS_getLastError()<<std::endl;
}
std::cout<<"end"<<std::endl;
PHYSFS_deinit();
return 0;
}
"myzip.zip" is archive of "myzip" folder that contain sub folder "folder"
My application output is:
begin
Can't print file list
File not found
end
My operation system is debian squeeze
Edited by themean, 29 June 2012 - 09:01 AM.






