class Path implements IOReadableWritable, Serializable {

	public Path makeQualified(FileSystem fs) {
		Path path = this;
		if (!isAbsolute()) {
			path = new Path(fs.getWorkingDirectory(), this);
		}

		final URI pathUri = path.toUri();
		final URI fsUri = fs.getUri();

		String scheme = pathUri.getScheme();
		String authority = pathUri.getAuthority();

		if (scheme != null && (authority != null || fsUri.getAuthority() == null)) {
			return path;
		}

		if (scheme == null) {
			scheme = fsUri.getScheme();
		}

		if (authority == null) {
			authority = fsUri.getAuthority();
			if (authority == null) {
				authority = "";
			}
		}

		return new Path(scheme + ":" + "//" + authority + pathUri.getPath());
	}

	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);

}