|
[A5] Questions regarding the "File System Routines" |
TeaRDoWN
Member #8,518
April 2007
|
1. How to get file names without their paths? 2. Can I filter the result on specific file extensions? |
Arthur Kalliokoski
Second in Command
February 2005
|
TeaRDoWN said: 1. How to get file names without their paths? Quote: 2. Can I filter the result on specific file extensions? If you click on your own link al_findfirst(), it gives an example of searching for pcx files. They all watch too much MSNBC... they get ideas. |
torhu
Member #2,727
September 2002
|
There is an al_get_path_basename() function, if you want something more portable than basename. You would then have to create (and destroy) a temporary ALLEGRO_PATH. |
Todd Cope
Member #998
November 2000
|
|
Thomas Fjellstrom
Member #476
June 2000
|
And if you already have an ALLEGRO_PATH for the file, you can use al_get_path_extension() to get the extension -- |
TeaRDoWN
Member #8,518
April 2007
|
Arthur: I know that you filter with al_findfirst() but it is an A4 function and does not exist in A5 which I've moved over to. Ok, thank guys for the answers. I'll use the al_get_path... functions to get the name and to filter on the extension. |
|