www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dirEntries() does not do source files *.d

reply Energo Koder <energokoder adres.pl> writes:
Dzień dobry!

dirEntries() does not do source files *.d .
I notice this when i test my app. Telme: Os this expected 
behavior?

Miłego dnia!
Energo Koder
Aug 09 2022
next sibling parent Energo Koder <energokoder adres.pl> writes:
On Tuesday, 9 August 2022 at 12:09:18 UTC, Energo Koder wrote:

Was:
 dirEntries() does not do source files *.d .
Should be: dirEntries() does not list source files *.d
Aug 09 2022
prev sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
Its working for me.

lpha DESKTOP-RB97SA4 
[/cygdrive/p/ProjectSidero/basic_memory/source/sidero/base/text/unicode$ 
rdmd --eval=$'import std; writeln(dirEntries(`.`, `*.d`, 
SpanMode.shallow));' 
     [".\\casefold.d", ".\\casing.d", ".\\comparison.d", 
".\\composing.d", ".\\defs.d", ".\\normalization.d", ".\\readonly.d", 
".\\wordbreak."]

Check what directory it is running in by called getcwd.

https://dlang.org/phobos/std_file.html#getcwd
Aug 09 2022