Only relevant for Win32 -> NT path conversion.
Asserts path is of type Dir.path.Win32PathType.local_device.
fn getLocalDevicePathType(comptime T: type, path: []const T) LocalDevicePathType
fn getLocalDevicePathType(comptime T: type, path: []const T) LocalDevicePathType {
if (std.debug.runtime_safety) {
assert(Dir.path.getWin32PathType(T, path) == .local_device);
}
const backslash = std.mem.nativeToLittle(T, '\\');
const all_backslash = path[0] == backslash and
path[1] == backslash and
path[3] == backslash;
return switch (path[2]) {
std.mem.nativeToLittle(T, '?') => if (all_backslash) .verbatim else .fake_verbatim,
std.mem.nativeToLittle(T, '.') => .local_device,
else => unreachable,
};
}