public ImmutablePair<FileInformation, Folder> getParentFolderAndFileInfo(final Folder rootFolder, final String subfolderAndName) {

        if (rootFolder == null || StringUtils.isBlank(subfolderAndName)) {
            return null;
        }

        //find parent folder of file
        final Folder parentFolder;
        final String fileName;
        final int idx = subfolderAndName.lastIndexOf("/");
        if (idx < 0) {
            parentFolder = rootFolder;
            fileName = subfolderAndName;
        } else {
            parentFolder = Folder.fromFolder(rootFolder, subfolderAndName.substring(0, idx));
            fileName = subfolderAndName.substring(idx + 1);
        }

        if (parentFolder == null) {
            return null;
        }

        try {
            final FileInformation fileInfo = getAccessorFor(parentFolder).getFileInfo(parentFolder, fileName);
            return new ImmutablePair<>(fileInfo, parentFolder);
        } catch (IOException ioe) {
            reportProblem(R.string.contentstorage_err_folder_access_failed, ioe, false, rootFolder);
        }
        return null;
    }
Returns information for a file denoted by a rootFolder and a file name.
This file name may be a simple file name (e.g. "myfile.txt"), but it may also include a
subfolder structure (e.g. "subfolder/deepersubfolder/myfile.txt").

@param rootFolder       root Folder
@param subfolderAndName file name to get information for, optionally with a subfolder structure before it
@return information about file (left) and direct parent folder of this file (right).
Note that file (left) might be null although its parent folder (right) is not null - e.g. if folder does exist, but not the file within it
main/src/main/java/cgeo/geocaching/storage/ContentStorage.java