BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-22-2009, 09:13 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: 9500
PIN: N/A
Carrier: F Bouygues Telecom
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default using filter in FileConnection's "list()" method

Please Login to Remove!

Hi,

I wrote a piece of code to enumerate a folder's content, with the list() method of javax.microedition.io.file package.

This method can be used without any parmeters, or with a String as filter.

I want to filter to search only for some file's extentions, but I can't figure out how to do this.

If I use a simple filter like "*.jpg", this will work.

If I use some sort of other filter, like "*.jpg;*.png" this does not work (no Exception, but got 0 entries in the enumeration)

I tried many many style of "filter string":
"*.jpg;*.png", "*.jpg *.png", "*.jpg|*.png", whith parenthesis, with "&", "," etc, nothing works

Doeas anyone know how to achieve this ? (I don't want to loop within an array specifying all the extentions that I want to filter.
__________________
___________________
Best regards,
Strato
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Vintage DEC Digital M8639-YB RDRX Disk Controller Board 50-15649-01 E1 M8639
$125.0
Vintage DEC Digital M8639-YB RDRX Disk Controller Board 50-15649-01 E1 M8639  pictureVintage SIGNODE Crimping W14 Tool 17.5" long pat#1784123 dec9 1930 /N12167
$24.35
Vintage SIGNODE Crimping W14 Tool  17.5HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$163.99
HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP pictureHSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC - VINTAGE CAR,BIKES, JEEP
$222.99
HSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC - VINTAGE CAR,BIKES, JEEP pictureVintage Working Pelouze Model Y-5 Postal Scale Up To 7 Lb. Dec 31, 1975
$18.95
Vintage Working Pelouze Model Y-5 Postal Scale Up To  7 Lb. Dec 31, 1975   picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.