Thread overview
Weird std.path API?
Jul 07
user1234
Jul 08
aberba
Jul 08
user1234
July 07

Seems different functions in std.path do not work together:

import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

Is this known thing or I'm doing something wrong?

July 07

On Sunday, 7 July 2024 at 14:41:31 UTC, Andrey Zherikov wrote:

>
import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

asNormalizedPath is misspelled.

July 07
On Sun, Jul 07, 2024 at 02:41:31PM +0000, Andrey Zherikov via Digitalmars-d-learn wrote:
> Seems different functions in std.path do not work together:
> ```d
> import std.path;
> 
> // Error: no property `asNormaliedPath` for
> `dirName("/sandbox/onlineapp.d")` of type `string`
> auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;
> ```
> 
> Is this known thing or I'm doing something wrong?

Isn't it supposed to be spelled .asNormalizedPath?


T

-- 
IBM = I Blame Microsoft
July 07

On Sunday, 7 July 2024 at 14:49:52 UTC, Anonymouse wrote:

>

On Sunday, 7 July 2024 at 14:41:31 UTC, Andrey Zherikov wrote:

>
import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

asNormalizedPath is misspelled.

My bad, sorry :)
My blurred eyes didn't catch that

July 07

On Sunday, 7 July 2024 at 15:35:36 UTC, Andrey Zherikov wrote:

>

On Sunday, 7 July 2024 at 14:49:52 UTC, Anonymouse wrote:

>

On Sunday, 7 July 2024 at 14:41:31 UTC, Andrey Zherikov wrote:

>
import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

asNormalizedPath is misspelled.

My bad, sorry :)
My blurred eyes didn't catch that

In first place I would have expected the spellcheck to find the error but it looks like that does not work with UFCS.

https://issues.dlang.org/show_bug.cgi?id=9997

July 08

On Sunday, 7 July 2024 at 15:35:36 UTC, Andrey Zherikov wrote:

>

On Sunday, 7 July 2024 at 14:49:52 UTC, Anonymouse wrote:

>

On Sunday, 7 July 2024 at 14:41:31 UTC, Andrey Zherikov wrote:

>
import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

asNormalizedPath is misspelled.

My bad, sorry :)
My blurred eyes didn't catch that

I use a plugin called Code Spell Checker in VS code...or maybe spell checker which highlights spelling mistakes in methods and strings.

July 08

On Monday, 8 July 2024 at 07:29:27 UTC, aberba wrote:

>

On Sunday, 7 July 2024 at 15:35:36 UTC, Andrey Zherikov wrote:

>

On Sunday, 7 July 2024 at 14:49:52 UTC, Anonymouse wrote:

>

On Sunday, 7 July 2024 at 14:41:31 UTC, Andrey Zherikov wrote:

>
import std.path;

// Error: no property `asNormaliedPath` for `dirName("/sandbox/onlineapp.d")` of type `string`
auto p = __FILE_FULL_PATH__.dirName.asNormaliedPath;

asNormalizedPath is misspelled.

My bad, sorry :)
My blurred eyes didn't catch that

I use a plugin called Code Spell Checker in VS code...or maybe spell checker which highlights spelling mistakes in methods and strings.

Does it help in this case ?