windowsDirIdentity

private fnstring windowsDirIdentity(string d)

Canonical directory identity on Windows for symlink-loop protection.

Lexical absolute paths never match when traversing a symlink cycle (each pass produces a longer string), so identity is derived from the volume serial number and file index via an opened handle. Falls back to the lexical absolute path when a handle cannot be opened.

Parameters

dDirectory path.

Returns

A string uniquely identifying the directory ("volume:fileIndex"), or

the absolute path as a fallback.