private static FileWithMeta getFilePath( ArchiveIndex fileInfo, File collectionFolderTemp, IonConfig config, Context context) { File targetFile; IonRequestType type = null; String url = fileInfo.url; String pageIdentifier = null; String filename = FilePaths.getFileName(url); try { // check URL is a collections or pages call IonRequestInfo requestInfo = IonPageUrls.analyze(url, config); pageIdentifier = requestInfo.pageIdentifier; type = requestInfo.requestType; targetFile = FilePaths.getFilePath(url, config, context, true); } catch (NoIonPagesRequestException e) { IonLog.w(TAG, "URL " + url + " cannot be handled properly. Is it invalid?"); targetFile = new File(collectionFolderTemp, filename); } return new FileWithMeta(targetFile, type, fileInfo, pageIdentifier); }