Set path
Paul whoknows

I need to force al_findfirst to search in a specific path, but I don't know how to do it.

Paul whoknows

The manual says


Sometimes Allegro doesn't look in enough places to find a resource. For those special cases, you can call this function before loading your resource with additional paths to search for. You set up the priorities, higher numbers are searched for first. To modify an already setup path, call this function with the same priority and the new path. To remove an already setup path, call this function with the priority of the path and NULL as the path parameter. Example:

These function are not what I am looking for.

I just want to use al_findfirst in a specific user-defined path.
In other words I need to set a working path, can I do that using allegro? how?


al_findfirst("foo/*.bar", ...?

Paul whoknows

Oh yes! thanks!

manual said:

if (al_findfirst("*.pcx", &info, FA_ALL) != 0)

It wasn't so obvious to me at first, gnolam your post was much more clear, can you write the manual?

Matthew Dalrymple

That is pretty standard for anything. When things ask for a filename you either supply just the filename and have to put the file in the same path as the executable or using relative or fixed paths. A manual shouldn't have to include that unless it was some how different.

Thread #588935. Printed from