[physfs] Not finding any directories
Berry, David
David.Berry at dcita.gov.au
Thu Dec 16 17:57:52 EST 2004
Got it.
The path separator has to be hardcoded to a "/"
for (i = rc; *i != NULL; i++)
{
strcpy(fullPath, "");
sprintf (fullPath, "%s%s%s", startPoint, "/", *i);
result = PHYSFS_isDirectory(fullPath);
// if (result != 0)
logToFile("We've got [%s] - [ %i ].", fullPath, result);
}
PHYSFS_freeList(rc);
Returns:
09:55:22 > We've got [test/dir_1] - [ 1 ].
09:55:22 > We've got [test/dir_2] - [ 1 ].
09:55:22 > We've got [test/file_1.txt] - [ 0 ].
09:55:22 > We've got [test/file_2.txt] - [ 0 ].
I was trying for platform independence by using PHYSFS_getDirSeparator()
Thanks
-----Original Message-----
From: Ryan C. Gordon [mailto:icculus at clutteredmind.org]
Sent: Friday, 17 December 2004 9:02 AM
To: physfs at icculus.org
Subject: Re: [physfs] Not finding any directories
> It is showing both files and directories - however,
'PHYSFS_isDirectory'
> isn't picking up the difference between a file and a directory. It
> should be returning a different result for the two.
It's returning 0 because it can't find "dir_1". "dir_1" doesn't exist.
"test/dir_1" does, however, and should return 1.
--ryan.
More information about the physfs
mailing list