resolveBookmark method
Converts the given bookmark, created previously with bookmark
back into either a File or a Directory depending on the optional value of isDirectory
, which defaults to false.
Before accessing it, it is still required to call
startAccessingSecurityScopedResource
Implementation
Future<FileSystemEntity> resolveBookmark(String bookmark,
{bool isDirectory = false}) async {
final String filePath = await _channel
.invokeMethod('URLByResolvingBookmarkData', {'bookmark': bookmark});
if (isDirectory) {
return Directory(filePath);
} else {
return File(filePath);
}
}