private String getFolderFromPath(String fileStr) {

		int pos = 0, lastPos = 0;
		while (pos != -1) {
			pos = fileStr.indexOf('/', lastPos);
			if (pos != -1)
				lastPos = pos + 1;
		}

		return fileStr.substring(0, lastPos);

	}