Implementation
D

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "io/ioutil"
x, err := ioutil.ReadDir(d)
FileUtil
x := FindAllFiles(d, '*', False);
SysUtils, Classes
  if FindFirst(IncludeTrailingPathDelimiter(d) + '*', 
               faAnyFile and (not faDirectory), SR) = 0 then
  repeat
    x.Add(SR.Name);
  until FindNext(SR) <> 0;
  FindClose(SR);
x = Dir.children(d)
use std::fs;
let x = fs::read_dir(d).unwrap();
import os
x = os.listdir(d)