public boolean foldersAreEqual(final Folder source, final Folder target) {
        if (source == null || target == null) {
            return false;
        }
        final String targetMarkerFileName = FileNameCreator.DEFAULT.createName();
        final Uri targetMarkerFileUri = pls.create(target, targetMarkerFileName);
        if (targetMarkerFileUri == null) {
            //this means we can't write to target
            return false;
        }
        try {
            final List<ContentStorage.FileInformation> files = pls.list(source);
            for (ContentStorage.FileInformation fi : files) {
                if (fi.name.equals(targetMarkerFileName)) {
                    return true;
                }
            }
        } finally {
            pls.delete(targetMarkerFileUri);
        }
        return false;
    }
checks whether source and target point to the same folder
main/src/main/java/cgeo/geocaching/storage/FolderUtils.java