|
JubeatPlus 3.9.11
|
Applilink SDK banner, resource, and data file cache utilities. More...
#include <ApplilinkFile.h>


Class Methods | |
| (ApplilinkFileFetchResult) | + getBannerWithUrl: |
| Fetch a banner image, caching it under the banner-image cache directory. | |
| (ApplilinkFileFetchResult) | + getResourceWithUrl: |
| Fetch a resource image, caching it under the resource cache directory. | |
| (ApplilinkFileFetchResult) | + getDataWithUrl: |
| Fetch a data file, caching it under the resource cache directory. | |
| (ApplilinkFileFetchResult) | + getCacheDataWithUrl: |
| Fetch a data file, caching it under the cache-data directory. | |
| (nullable NSData *) | + getFileWithUrl: |
| Download the contents of a URL synchronously. | |
| (void) | + saveData:file:path: |
| Write data to a named file under a directory. | |
| (void) | + deleteFile:path: |
| Delete a named file under a directory. | |
| (void) | + deleteFile: |
| Delete a file at a path. | |
| (BOOL) | + existFile:path: |
| Test whether a named file exists under a directory. | |
| (BOOL) | + existImageFile:path: |
| Test whether a named image file exists and is loadable under a directory. | |
| (void) | + createFolder |
| Create the applilink cache folder tree if it is missing. | |
| (nullable NSString *) | + getContentsPath |
The applilink/contents directory under the temporary directory. | |
| (nullable NSString *) | + getBannerCachePath |
The banner-image cache directory (contents/cache_img). | |
| (nullable NSString *) | + getResourcePath |
The resource directory (contents/res). | |
| (nullable NSString *) | + getCacheDataPath |
The cache-data directory (contents/cache_data). | |
| (nullable NSString *) | + getTemplatePathWithAdModel:adLocation: |
| Build the HTML template path for an ad model and location. | |
| (void) | + delateFolder |
| Delete the entire contents directory tree. | |
| (void) | + clearCacheBannerImage |
| Prune stale banner-image cache files. | |
| (void) | + clearCacheData |
| Prune stale cache-data files. | |
| (void) | + allClearCacheBannerImage |
| Delete and recreate the banner-image cache directory. | |
Applilink SDK banner, resource, and data file cache utilities.
| + (void) allClearCacheBannerImage |
Delete and recreate the banner-image cache directory.
| + (void) clearCacheBannerImage |
Prune stale banner-image cache files.
Ensures the banner cache directory exists, then removes every file whose modification date is more than one day old.
| + (void) clearCacheData |
Prune stale cache-data files.
Ensures the cache-data directory exists, then removes every file whose modification date is more than one day old.
| + (void) createFolder |
Create the applilink cache folder tree if it is missing.
Ensures the applilink directory in the temporary directory and, beneath its contents subdirectory, the cache_img, cache_data, and res directories all exist.
| + (void) delateFolder |
Delete the entire contents directory tree.
The selector keeps the binary's misspelling (delateFolder) verbatim.
| + (void) deleteFile: | (nullable NSString *) | path |
Delete a file at a path.
The path is deleted only when it is non-nil and non-empty.
| path | The path to delete. |
| + (void) deleteFile: | (nullable NSString *) | file | |
| path: | (nullable NSString *) | path |
Delete a named file under a directory.
| file | The file name to delete under path. |
| path | The directory containing the file. |
| + (BOOL) existFile: | (nullable NSString *) | file | |
| path: | (nullable NSString *) | path |
Test whether a named file exists under a directory.
| file | The file name to test under path. |
| path | The directory to look in. |
YES when the file exists. | + (BOOL) existImageFile: | (nullable NSString *) | file | |
| path: | (nullable NSString *) | path |
Test whether a named image file exists and is loadable under a directory.
When the file exists but cannot be decoded as a UIImage, it is deleted and NO is returned.
| file | The image file name to test under path. |
| path | The directory to look in. |
YES when the file exists and decodes as an image. | + (NSString *) getBannerCachePath |
The banner-image cache directory (contents/cache_img).
| + (ApplilinkFileFetchResult) getBannerWithUrl: | (nullable id) | url |
Fetch a banner image, caching it under the banner-image cache directory.
When url is an NSNull, or the banner is already cached, the file is left untouched. Otherwise the file is downloaded, decoded as a UIImage to validate it, and written to the cache under the URL's trailing file-name component.
| url | The banner URL, or an NSNull to skip the fetch. |
| + (NSString *) getCacheDataPath |
The cache-data directory (contents/cache_data).
| + (ApplilinkFileFetchResult) getCacheDataWithUrl: | (nullable NSString *) | url |
Fetch a data file, caching it under the cache-data directory.
| url | The data URL. |
| + (NSString *) getContentsPath |
The applilink/contents directory under the temporary directory.
| + (ApplilinkFileFetchResult) getDataWithUrl: | (nullable NSString *) | url |
Fetch a data file, caching it under the resource cache directory.
Unlike +getResourceWithUrl: the payload is not decoded as an image; any downloaded data is written to the cache under the URL's trailing file-name component.
| url | The data URL. |
| + (nullable NSData *) getFileWithUrl: | (nullable NSString *) | url |
Download the contents of a URL synchronously.
| url | The URL to download. |
nil when the request failed. | + (NSString *) getResourcePath |
The resource directory (contents/res).
| + (ApplilinkFileFetchResult) getResourceWithUrl: | (nullable NSString *) | url |
Fetch a resource image, caching it under the resource cache directory.
The resource is downloaded and validated as a UIImage before being written to the cache under the URL's trailing file-name component; an already-cached resource is left untouched.
| url | The resource URL. |
| + (nullable NSString *) getTemplatePathWithAdModel: | (int) | adModel | |
| adLocation: | (nullable NSString *) | adLocation |
Build the HTML template path for an ad model and location.
The file name is formatted as "<adModel>_<adLocation>.html" under the contents directory.
| adModel | The ad-model identifier. |
| adLocation | The ad-location identifier. |
| + (void) saveData: | (nullable NSData *) | data | |
| file: | (nullable NSString *) | file | |
| path: | (nullable NSString *) | path |
Write data to a named file under a directory.
| data | The data to write. |
| file | The file name to write under path. |
| path | The directory to write into. |