4 ms·
On a Unix-compatible system, ls(1) is the highest-level interface to get a directory listing. There is no good reason for Emacs to use scandir(3) (or even open
by teddyh 4y ago
On a Unix-compatible system, ls(1) is the highest-level interface to get a directory listing. There is no good reason for Emacs to use scandir(3) (or even opendir(3)/readdir(3)).
- lispm 4y agoGNU Emacs has complex code to deal with it. Some "ls" programs support a "-dired" option, some not. If this option is not supported, then Dired may fail to parse some unusual filenames. Then there is an 'ls' emulation in Emacs Lisp, which by default is not used on UNIX, but on Windows... There is a huge machinery with lots of complexity to deal with listing directories, either with ls, a GNU provided ls, or by providing a complex emulation of ls.