// leaving out the the file name
StringBuffer sLocalDirectory = new StringBuffer();
if (oFileURI.device() == null) {
sLocalDirectory.append("/");
} else {
sLocalDirectory.append(oFileURI.device() + "/");
}
for (int i = 0; i < oFileURI.segmentCount() - 1; ++i) {
sLocalDirectory.append(oFileURI.segment(i) + "/");
}
// replace placeholder with empty space