什么是抽象路径?抽象路径名的意义在于程序逻辑编程中,直接以抽象路径代表不同系统下的路径,程序员不用考虑路径在不同系统的具体差异性。

英文解释如下:

  • 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.

  • When an abstract pathname is converted into a pathname string, each name is separated from the next by a single copy of the default separator character.

  • When a pathname string is converted into an abstract pathname, the names within it may be separated by the default name-separator character or by any other name-separator character that is supported by the underlying system.


对应的翻译如下:

用户界面和操作系统使用系统相关的路径名字符串来命名文件和目录。这个类提供了层次路径名的抽象的、系统独立的视图。

在将抽象路径名转换为路径名字符串时,每个名称都由一个默认分隔符的副本与下一个名称分隔开。

当将路径名字符串转换为抽象路径名时,可以使用默认的名称分隔符或底层系统支持的任何其他名称分隔符分隔其中的名称。


实践一下:

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值