Last active
April 10, 2019 21:15
-
-
Save JoJoDeveloping/01eda7d509ae19c5d094d19e265ab1ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls -la pd/ | |
total 12 | |
drwxr-xr-x 3 myname myname 4096 Apr 10 23:08 . | |
drwxr-xr-x 5 myname myname 4096 Apr 10 23:08 .. | |
lrwxrwxrwx 1 myname myname 3 Apr 10 23:06 a -> b/c | |
drwxr-xr-x 3 myname myname 4096 Apr 10 23:05 b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pwd: /mnt/workfs/myname/Minecraft/Plugins/workspace/run/. | |
a: a | |
pth: pd/a | |
abs: /mnt/workfs/myname/Minecraft/Plugins/workspace/run/pd/a | |
can: /mnt/workfs/myname/Minecraft/Plugins/workspace/run/pd/b/c | |
parent: pd | |
parent-name: pd | |
parent-abs: /mnt/workfs/myname/Minecraft/Plugins/workspace/run/pd | |
parent-can: /mnt/workfs/myname/Minecraft/Plugins/workspace/run/pd | |
parent-pth: pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File test = new File("pd/a"); | |
System.out.println("a: "+test.getName()); | |
System.out.println("pth: "+test.getPath()); | |
System.out.println("abs: "+test.getAbsolutePath()); | |
System.out.println("can: "+test.getCanonicalPath()); | |
File parent = test.getParentFile(); | |
System.out.println("parent: "+test.getParent()); | |
System.out.println("parent-name: "+parent.getName()); | |
System.out.println("parent-abs: "+parent.getAbsolutePath()); | |
System.out.println("parent-can: "+parent.getCanonicalPath()); | |
System.out.println("parent-pth: "+parent.getPath()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment