黑马程序员技术交流社区

标题: 关于File类中JDK文档中的说明 [打印本页]

作者: 孙斌    时间: 2011-7-22 01:10
标题: 关于File类中JDK文档中的说明
看了下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 编辑 ]
作者: 匿名    时间: 2011-7-22 01:28
"\\\\",其中有第一个和第三个\是转义字符,所以"\\\\"==“\\”。这是指微软文件系统盘符后跟的标识,如C:\\softer\it168。




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2