@Override
  public @Nullable JimfsPath getParent() {
    if (names.isEmpty() || (names.size() == 1 && root == null)) {
      return null;
    }

    return pathService.createPath(root, names.subList(0, names.size() - 1));
  }
Equivalent to {@link #getFileSystem()} but with a return type of {@code JimfsFileSystem}.
{@code getFileSystem()}'s return type is left as {@code FileSystem} to make testing paths
easier (as long as methods that access the file system in some way are not called, the file
system can be a fake file system instance).
jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java