Returns a new file made from the pathname of the parent of this file. This is the path up to but not including the last name. null is returned when there is no parent. @return a new file representing this file's parent or null.
()
| 722 | * @return a new file representing this file's parent or {@code null}. |
| 723 | */ |
| 724 | public File getParentFile() { |
| 725 | String tempParent = getParent(); |
| 726 | if (tempParent == null) { |
| 727 | return null; |
| 728 | } |
| 729 | return new File(tempParent); |
| 730 | } |
| 731 | |
| 732 | /** |
| 733 | * Returns the path of this file. |