R
RonRan
Hi,
The javadoc for the getCanonicalPath() method of java.io.File class
mentions the following :
"Every pathname that denotes an existing file or directory has a unique
canonical form. Every pathname that denotes a nonexistent file or
directory also has a unique canonical form. The canonical form of the
pathname of a nonexistent file or directory may be different from the
canonical form of the same pathname after the file or directory is
created. Similarly, the canonical form of the pathname of an existing
file or directory may be different from the canonical form of the same
pathname after the file or directory is deleted. "
Can someone please explain this with some concrete example? I am
confused as to how a nonexistent file can have a canonical path and
also how it may change when that file is created.
Thanks,
Rohan
The javadoc for the getCanonicalPath() method of java.io.File class
mentions the following :
"Every pathname that denotes an existing file or directory has a unique
canonical form. Every pathname that denotes a nonexistent file or
directory also has a unique canonical form. The canonical form of the
pathname of a nonexistent file or directory may be different from the
canonical form of the same pathname after the file or directory is
created. Similarly, the canonical form of the pathname of an existing
file or directory may be different from the canonical form of the same
pathname after the file or directory is deleted. "
Can someone please explain this with some concrete example? I am
confused as to how a nonexistent file can have a canonical path and
also how it may change when that file is created.
Thanks,
Rohan