fileExists static method
- String relativePath
Check if a file exists in the POD.
relativePath - Path relative to the data directory.
Implementation
static Future<bool> fileExists(String relativePath) async {
if (!await PodAuth.isLoggedIn()) {
return false;
}
try {
final url = await PodPath.getFileUrl(relativePath);
final status = await PodHttp.checkStatus(url);
return status == ResourceStatus.exist;
} catch (e) {
debugPrint('PodFileSystem.fileExists() - exception: $e');
return false;
}
}