File
来源:互联网 发布:淘宝店铺突然找不到了 编辑:程序博客网 时间:2024/05/20 11:31
An abstract representation of file and directory pathnames.
Windows C:\citi\HR\TransportExpense Meal\test.txt
UNIX /opt/ARIS/CRAFT/craft_logs/test1.txt
OS
separator
pathSeparatorChar
prefix
getName()
getParent()
UNIX
/
:
/
test1.txt
C:\citi\HR\Transport Expense Meal
Windows
\
;
C:\
test.txt
/opt/ARIS/CRAFT/craft_logs
当输入为绝对路径时,返回的都是绝对路径。
当输入为相对路径时:
getPath()返回的是File构造方法里的路径,是什么就是什么,不增不减
getAbsolutePath()返回的其实是user.dir+getPath()的内容,从上面F:\eclipseworkspace\testejb、F:\eclipseworkspace\testejb\..\src\test1.txt、F:\eclipseworkspace\testejb\.\test1.txt可以得出。
getCanonicalPath()返回的就是标准的将符号完全解析的路径 0 0
- File
- file
- File
- file
- File
- File
- file
- file
- file
- File
- File
- file
- file
- File
- FILE
- file
- file
- file
- ConcurrentHashMap原理图
- Linux双网卡绑定
- ZooKeeper实战(五)基于zookeeper的分布式锁实现
- php对查询结果集进行排序
- 安卓 屏幕的分辨率
- File
- 拥抱变化以致远:P2P行业实践金融创新
- IE=edge,chrome=1的META信息详解
- access2000或者2003压缩修复异常解决方式
- HDU 2571 命运
- python setuptools安装
- 产品设计的十条理论
- STM32 GPIO 简单操作函数
- php获得一段时间内的月和周