closedir.bmx 263 B

12345678910111213141516171819
  1. 'File System Example
  2. SuperStrict
  3. Local dir:Byte Ptr = ReadDir(BlitzMaxPath())
  4. If Not dir Then
  5. RuntimeError "Cannot open folder"
  6. End If
  7. Local file:String
  8. Repeat
  9. file = NextFile(dir) ' Get the filenames in folder
  10. Print file
  11. Until Not file
  12. CloseDir(dir)