正向和反向之间的区别 [英] Difference between forward and backslash

查看:218
本文介绍了正向和反向之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在导航文件系统中使用正斜杠和反斜杠有什么区别。还有, ./ ../



.. 是当前目录, .. 是父目录。


What is the difference in using a forward slash and backslash in navigating file systems. Also what is the difference between ./ and ../?

解决方案

Well, in most languages backslashes need to be escaped in string literals, slashes do not. Further backslashes only work on Windows, while slashes work pretty much everywhere.

On the other hand, when passing path names as arguments to Windows programs, using slashes might not work because many Windows programs use slashes to signify command line flags, so you need to use backslashes.

On . vs. ..: . is the current directory, .. is the parent directory.

这篇关于正向和反向之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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