Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

From the BREW API reference:

"IFILEMGR_EnumInit() and IFILEMGR_EnumNext() enumerate all the directories or files in a given directory. You can also enumerate all the files with a given file extension. You first call IFILEMGR_EnumInit() to specify the directory in which you want to enumerate files and directories. Each subsequent call to IFILEMGR_EnumNext() provides information about one of the requested directories or files, such as its name, size, creation date, and attributes."

My question is how does one do that? This statement makes it sound like the API supports browsing by file extension, but short of writing my own code to parse the file name and extract the extension I don't see how IFILEMGR is supposed to do this.

Use the following expression in the EnumInit call
fs:/~/Photos/*.jpg
This will search for only .jpg files in the given folder. Hope this helps other people.
- SD

Use the following expression in the EnumInit call
fs:/~/Photos/*.jpg
This will search for only .jpg files in the given folder. Hope this helps other people.
- SD

You just saved my life!!! The current BMP requires us to use that expression; otherwise, the app will get stuck at IFILEMGR_EnumNext!
Many thanks!
alokasd wrote:Use the following expression in the EnumInit call
fs:/~/Photos/*.jpg
This will search for only .jpg files in the given folder. Hope this helps other people.
- SD

You just saved my life!!! The current BMP requires us to use that expression; otherwise, the app will get stuck at IFILEMGR_EnumNext!
Many thanks!
alokasd wrote:Use the following expression in the EnumInit call
fs:/~/Photos/*.jpg
This will search for only .jpg files in the given folder. Hope this helps other people.
- SD