https://issues.dlang.org/show_bug.cgi?id=20109
shove <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from shove <[email protected]> --- I don't think there is any problem here. It is correct to throw an exception to a non-existent file getSize. When traversing files, folders and symlinks, we should judge them and decide whether to do some operations. import std.file; import std.stdio; string path = "..."; foreach (DirEntry e; dirEntries(path, SpanMode.shallow)) { if (e.isSymlink) { string origin = readLink(e.name); if (origin.exists) writeln(origin, ", size: ", e.size); else writeln(origin, " not exists. "); } } --
