file_cloud 0.1.0 copy "file_cloud: ^0.1.0" to clipboard
file_cloud: ^0.1.0 copied to clipboard

A cloud filesystem abstraction layer for Dart, providing unified access to cloud storage providers like MinIO and S3-compatible services.

example/file_cloud_example.dart

import 'package:file_cloud/file_cloud.dart';
import 'package:file_cloud/drivers.dart';

void main() async {
  // Create a Minio client
  final minio = Minio(
    endPoint: 'localhost',
    port: 9000,
    accessKey: 'minioadmin',
    secretKey: 'minioadmin',
    useSSL: false,
  );

  // Create the cloud driver
  final driver = MinioCloudDriver(
    client: minio,
    bucket: 'test-bucket',
    autoCreateBucket: true,
  );

  // Create the filesystem
  final fs = CloudFileSystem(driver: driver);

  // Ensure the backend is ready
  await fs.driver.ensureReady();

  // Write a file
  await fs.file('example.txt').writeAsString('Hello from file_cloud!');

  // Read it back
  final content = await fs.file('example.txt').readAsString();
  print(content);

  // Clean up
  await fs.file('example.txt').delete();
}
0
likes
150
points
495
downloads

Publisher

verified publisherglenfordwilliams.com

Weekly Downloads

A cloud filesystem abstraction layer for Dart, providing unified access to cloud storage providers like MinIO and S3-compatible services.

Repository (GitHub)
View/report issues

Topics

#cloud-storage #filesystem #minio #s3-compatible

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

convert, crypto, file, http, meta, mime, minio, path

More

Packages that depend on file_cloud