Java: toAbsolutePath
Giải phóng thời gian, khai phóng năng lực
Path toAbsolutePath()
Returns a
Path
object representing the absolute path of this path.
If this path is already absolute
then this method simply returns this path. Otherwise, this method resolves the path in an implementation dependent manner, typically by resolving the path against a file system default directory. Depending on the implementation, this method may throw an I/O error if the file system is not accessible.
Returns:
a Path
object representing the absolute path
Throws:
IOError
- if an I/O error occurs
SecurityException
- In the case of the default provider, a security manager is installed, and this path is not absolute, then the security manager's checkPropertyAccess
method is invoked to check access to the system property user.dir
Giải phóng thời gian, khai phóng năng lực