func_file_loaddir.rst 619 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. _func_file_loaddir:
  2. =======
  3. LoadDir
  4. =======
  5. LoadDir -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. LoadDir$[]( dir$,skip_dots=True )
  10. Load a directory
  11. The @skip_dots parameter, if true, removes the '.' (current) and '..'
  12. (parent) directories from the returned array.
  13. Parameters
  14. ==========
  15. Return Values
  16. =============
  17. A string array containing contents of @dir
  18. Examples
  19. ========
  20. .. code-block:: blitzmax
  21. ' loaddir.bmx
  22. ' declare a string array
  23. local files$[]
  24. files=loaddir(currentdir())
  25. for t$=eachin files
  26. print t
  27. next
  28. See Also
  29. ========