Java : method to to print relative pathname?
Posted
by HH
on Stack Overflow
See other posts from Stack Overflow
or by HH
Published on 2010-04-08T22:23:40Z
Indexed on
2010/04/09
2:53 UTC
Read the original article
Hit count: 430
I am hesitant just to look at some env.vars and try to replace things with regexes. So is there a ready method to print relative pathnames system-independently?
$ echo ~
/u/user
$ pwd
/u/user/OH/one/src
$ echo "Like relative pathnames ~/OH/one/src, not /u/user/OH/one/src."
© Stack Overflow or respective owner