那么Windows下路径斜线(/或)的正确方向是什么? [英] So what IS the right direction of the path's slash (/ or ) under Windows?

查看:37
本文介绍了那么Windows下路径斜线(/或)的正确方向是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎 Windows 坚持在文件路径中写入反斜杠 ,而 .NET 的 URI 类使用斜杠 / 写入它们.有没有正确的方法,即使在最原始的系统中也可以接受?为什么 .NET 的 URI 与 Windows 的其余部分相比显示另一个斜线?

It seems Windows insists on writing a backslash in file paths, whereas .NET's URI class writes them with a slash /. Is there any right way, that is accepted even in the most primitive systems? And why is .NET's URI showing the other slash compared with the rest of Windows?

推荐答案

文件路径和 URI 不同. 在 Windows 文件路径中是正确的,而 / 在 URI 中是正确的.

A file path and a URI are different. is correct in a Windows file path and / is correct in a URI.

所以这个文件路径:C:DocumentsFoo 转换成这个 URI:file:///C:/Documents/Foo

So this file path: C:DocumentsFoo translates to this URI: file:///C:/Documents/Foo

这篇关于那么Windows下路径斜线(/或)的正确方向是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆