A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 孙斌   /  2011-7-22 01:10  /  2253 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

看了下File类JDK文档的说明,摘录如下:
An abstract representation of file and directory pathnames.User interfaces and operating systems use system-dependent pathname strings to name files and directories. This class presents an abstract, system-independent view of hierarchical pathnames. An abstract pathname has two components:

1.An optional system-dependent prefix string, such as a disk-drive specifier, "/" for the UNIX root directory, or "\\\\" for a Microsoft Windows UNC pathname, and
2.A sequence of zero or more string names.

The prefix of a UNC pathname is "\\\\"; UNC路径是什么意思?UNC路径的前缀是"\\\\",能否举个例子?
[ 本帖最后由 孙斌 于 2011-07-22  01:12 编辑 ]

评分

参与人数 1技术分 +1 收起 理由
老罗 + 1

查看全部评分

1 个回复

倒序浏览
黑马网友  发表于 2011-7-22 01:28:47
沙发
"\\\\",其中有第一个和第三个\是转义字符,所以"\\\\"==“\\”。这是指微软文件系统盘符后跟的标识,如C:\\softer\it168。

评分

参与人数 1技术分 +1 收起 理由
老罗 + 1 我很赞同

查看全部评分

回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马