Directory Factory

BlitzMax Forums/BlitzMax Programming/Directory Factory

JoshK(Posted 2008) [#1]
This approach makes more sense to me than ReadDir() and NextFile(). It can be extended for zip files or a web folder. ReadDirectory() just returns a list of strings that are the file names:
http://blitzmax.com/codearcs/codearcs.php?code=2268


JoshK(Posted 2008) [#2]
I added an HTTPDirectory factory for getting the contents of a web folder, but I think FTP would be better.


grable(Posted 2008) [#3]
Hmmm.. this sounds like LoadDir, yours is more fancy though ;)


JoshK(Posted 2008) [#4]
It works by parsing the index file generated by a server when no index file is present. It won't work for web folders that have an index file, like http::blitzmax.com. It would be better if there was a way to use FTP protocols or something to get a real directory listing.