phobo's std.file is completely broke!

Vladimir Panteleev thecybershadow.lists at gmail.com
Wed Sep 19 06:55:13 UTC 2018


On Wednesday, 19 September 2018 at 06:34:33 UTC, Nick Sabalausky 
(Abscissa) wrote:
> - Does it actually, necessarily perform those additional OS 
> calls?

We need to expand relative paths to absolute ones, for which we 
need to fetch the current directory.

> - Is it really?

Is what really what? If you mean the memory allocation, we do 
need a buffer to store the current directory. We also need to 
canonicalize away things like \..\, though we may be able to get 
away with it without allocating.

> - If it actually does, are those additional, necessarily OS 
> calls prohibitively expensive?

They are certainly going to be less expensive that actual 
filesystem operations that hit the physical disk, but it will 
still be an unwanted overhead in 99.9% of cases.

In any case, the overhead is only one issue.



More information about the Digitalmars-d mailing list