getCachedFilesPath method
Returns an List<String>
with all cached files full path
To cach an Directory call cache
and to clear a cached Directory call clearCache
Implementation
Future<List<String>?> getCachedFilesPath() async {
try {
const kGetFilesPath = "getCachedFilesPath";
const kCacheDirectoryName = "cacheDirectoryName";
var cacheDirectoryName = makeDirectoryPathToName(_directory);
final args = <String, dynamic>{
kCacheDirectoryName: cacheDirectoryName,
};
final paths = await kDocumentFileChannel.invokeMethod<List<dynamic>?>(
kGetFilesPath, args);
if (paths == null) return null;
return List<String>.from(paths);
} catch (e) {
return null;
}
}