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