Dart - bucket.files()
Get a list of file references for files that exist in the bucket.
import 'package:nitric_sdk/nitric.dart';final assets = Nitric.bucket("assets").allow([BucketPermission.read,BucketPermission.delete,]);final files = await assets.files();
Examples
delete all files in a bucket
import 'package:nitric_sdk/nitric.dart';final assets = Nitric.bucket("assets").allow([BucketPermission.read,BucketPermission.delete,]);final files = await assets.files();await Future.wait(files.map((file) async {await file.delete();}));
Notes
This method returns a list of File references that exist on the bucket.
Last updated on Oct 11, 2024