program libfatdir; uses ctypes, nds9, fat; var MyDir: PDir; pent: pdirent; statbuf: Tstat; begin // Initialise the console, required for printf consoleDemoInit(); if (fatInitDefault()) then begin MyDir := opendir('/'); if (MyDir) <> nil then begin repeat pent := readdir(MyDir); _stat(pent^.d_name, statbuf); if (strcmp('.', pent^.d_name) = 0) or (strcmp('..', pent^.d_name) = 0) then continue; if (S_ISDIR(statbuf.st_mode)) then iprintf('%s