package java.io;

public class File {
  static {
    System.loadLibrary("natives");
  }

  private final String path;

  public File(String path) {
    if (path == null) throw new NullPointerException();
    this.path = path;
  }

  public File(String parent, String child) {
    this(parent + "/" + child);
  }

  public File(File parent, String child) {
    this(parent.getPath() + "/" + child);
  }

  public String getName() {
    int index = path.lastIndexOf("/");
    if (index >= 0) {
      return path.substring(index + 1);
    } else {
      return path;
    }
  }

  public String getPath() {
    return path;
  }

  private static native String toCanonicalPath(String path);

  public String getCanonicalPath() {
    return toCanonicalPath(path);
  }

  public File getCanonicalFile() {
    return new File(getCanonicalPath());
  }

  private static native String toAbsolutePath(String path);

  public String getAbsolutePath() {
    return toAbsolutePath(path);
  }

  private static native long length(String path);

  public long length() {
    return length(path);
  }

  private static native boolean exists(String path);

  public boolean exists() {
    return exists(path);
  }

  private static native void mkdir(String path);

  public void mkdir() {
    mkdir(path);
  }

  private static native void createNewFile(String path);

  public void createNewFile() {
    createNewFile(path);
  }
}

@@ -614,24 +614,311 @@
  path;%0A  %7D%0A%0A
+  public String getParent() %7B%0A    int index = path.lastIndexOf(%22/%22);%0A    if (index %3E= 0) %7B%0A      return path.substring(0, index);%0A    %7D else %7B%0A      return null;%0A    %7D    %0A  %7D%0A%0A  public File getParentFile() %7B%0A    String s = getParent();%0A    return (s == null ? null : new File(s));%0A  %7D%0A%0A
   private st

implement File.getParent()