private static String getParentPath(final String path) {
        if (path == null) {
            return null;
        }
        final int idx = path.lastIndexOf("/");
        return idx < 0 ? path : path.substring(0, idx);
    }
returns null in case of failre, true if file needed copy (and was copied), false if file didn't need copy)
main/src/main/java/cgeo/geocaching/storage/FolderUtils.java