CloudflareR2Filesystem constructor
CloudflareR2Filesystem({
- required CloudflareR2Bucket bucket,
- String? prefix,
- bool readOnly = false,
- bool throwOnError = false,
Creates a filesystem backed by bucket.
prefix is an optional object-key prefix without special R2 semantics;
it is normalized to slash-separated relative segments. When readOnly
is true, write operations return false, or throw when throwOnError is
also true.
Implementation
CloudflareR2Filesystem({
required this.bucket,
String? prefix,
this.readOnly = false,
this.throwOnError = false,
}) : prefix = _normalizePrefix(prefix);