I have a directory:
File dir = new File(MY_PATH);
I would like to list all the files whose name is indicated as integer numbers strings, e.g. "10", "20".
I know I should use:
dir.list(FilenameFilter filter);
How to define my FilenameFilter
?
P.S. I mean the file name could be any integer string, e.g. "10" or "2000000" or "3452345". No restriction in the number of digits as long as the file name is a integer string.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…