class Path implements IOReadableWritable, Serializable {

	public Path getParent() {
		final String path = uri.getPath();
		final int lastSlash = path.lastIndexOf('/');
		final int start = hasWindowsDrive(path, true) ? 3 : 0;
		if ((path.length() == start) || // empty path
			(lastSlash == start && path.length() == start + 1)) { // at root
			return null;
		}
		String parent;
		if (lastSlash == -1) {
			parent = CUR_DIR;
		} else {
			final int end = hasWindowsDrive(path, true) ? 3 : 0;
			parent = path.substring(0, lastSlash == end ? end + 1 : lastSlash);
		}
		return new Path(uri.getScheme(), uri.getAuthority(), parent);
	}

	public  Path();
	public  Path(URI uri);
	public  Path(String parent, String child);
	public  Path(Path parent, String child);
	public  Path(String parent, Path child);
	public  Path(Path parent, Path child);
	public  Path(String pathString);
	public  Path(String scheme, String authority, String path);

}