This has long been a memory consumption problem and a performance problem when listing contents of a directory with many files therein. I've had programs run out of memory because of populating a large array. In my experience. The Enumeration flavors are always better.
This issue proposes marking the four flavors of listFiles() as deprecated with alternatives being new functions that return a List<IFSFile>. The List<IFSFile> would have the benefit of easier use and better efficiency (it would wrap the current Enumeration support and load incrementally). It's unfortunate that the current functions have list in the name. If we were to add another variant, it would be something like listFilesList() or listFilesAsList(). Eew
This has long been a memory consumption problem and a performance problem when listing contents of a directory with many files therein. I've had programs run out of memory because of populating a large array. In my experience. The Enumeration flavors are always better.
This issue proposes marking the four flavors of
listFiles()
as deprecated with alternatives being new functions that return aList<IFSFile>
. TheList<IFSFile>
would have the benefit of easier use and better efficiency (it would wrap the current Enumeration support and load incrementally). It's unfortunate that the current functions havelist
in the name. If we were to add another variant, it would be something likelistFilesList()
orlistFilesAsList()
. Eew@jeber-ibm, thoughts?