Problems with readdir and creating a list
BlitzMax Forums/BlitzMax Programming/Problems with readdir and creating a list
| ||
I have some trouble with reading all files in a directory and storing the data into a TList. Here is my Code Sample; ' readdir.bmx dir=ReadDir(CurrentDir()) If Not dir RuntimeError "failed to read current directory" Global dirlist:TList=CreateList() Repeat t$=NextFile( dir ) If t="" Exit If t="." Or t=".." Continue Print t ListAddLast dirlist,t$ Forever For dirlist=EachIn list Print dirlist Next CloseDir dir has anyone a idea? |
| ||
OK. I have done. It work's now! |
| ||
I believe you need to use the list functions with types. That way, you can get values out of each item. |