Why doesn't std.file.exists follow symbolic links?

Jack Applegame japplegame at gmail.com
Fri Jul 2 12:09:20 UTC 2021


```d
import std.stdio : writeln;
import std.file : exists, write, symlink, remove;

void main() {
     write("file.txt", "hello");
     symlink("file.txt", "link.txt");
     writeln(exists("link.txt")); // true
     remove("file.txt");
     writeln(exists("link.txt")); // true, why?
}
```

In other languages (including C++) similar functions follow 
symbolic links.



More information about the Digitalmars-d mailing list