| Author |
what is the maximum size? File [] files = dir.listFiles()
|
Jennifer McAllister
Greenhorn
Joined: Jan 14, 2003
Posts: 2
|
|
I have over 1000 files and when my program fails around this line: File [] files = dir.listFiles(); It works with a little over 500 files. Is there a maximum size it can handle? each file is about 4k.
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
I don't believe there's any max as far as Java is concerned, other than Integer.MAX_VALUE which limits the size of any array. Perhaps there's some platform limitation? What exactly happens when this method fails? Is an exception thrown? What if you list files outisde Java, using OS commands - can you list all 1000 files? You can probably list the files to a new file - e.g. (for Windows) (Don't put the new output file in the same directory you're trying to list - that just confuses things.) Once you have the output in a file, you can see how many lines there are, and check for any other anomalies.
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: what is the maximum size? File [] files = dir.listFiles()
|
|
|