FilesystemReadPermission.file constructor
FilesystemReadPermission.file(
- String file
Create a new filesystem permission that matches a specific file.
Implementation
factory FilesystemReadPermission.file(String file) {
final escaped = file.replaceAll(r'\', r'\\').replaceAll(r'/', r'\/');
return FilesystemReadPermission(RegExp('^$escaped\$'));
}