FilesystemWritePermission.directory constructor
FilesystemWritePermission.directory(
- String dir
Create a new filesystem permission that matches any file in a directory or one of its subdirectories.
Implementation
factory FilesystemWritePermission.directory(String dir) {
final escaped = dir.replaceAll(r'\', r'\\').replaceAll(r'/', r'\/');
return FilesystemWritePermission(RegExp('^$escaped.*'));
}