universal_file 1.0.0 copy "universal_file: ^1.0.0" to clipboard
universal_file: ^1.0.0 copied to clipboard

Cross-platform File & Directory that works in all platforms (browsers, Flutter, and VM)

A cross-platform File & Directory that works in all platforms (browsers, mobile, desktop, and server-side)


Pub

PurposeGetting StartedCredits

Purpose #

The purpose of the library is to be able to use the file everywhere. Nothing more superfluous - just a File, Directory and Link

Getting Started #

Just import

import 'package:universal_file/universal_file.dart';

// And usage anywhere with backward capability!
try {
  final file = File('$object.txt');
  if (await file.exists()) {
    final modified = await file.lastModified();
    print(
        'File for $object already exists. It was modified on $modified.');
    continue;
  }
  await file.create();
  await file.writeAsString('Start describing $object in this file.');
  final description = await file.readAsString();
  print(description);
} on IOException catch (e) {
  print('Cannot create description for $object: $e');
}

Full api reference available here

Credits #

This software is decomposition of [universal_io] (Removed all except FileSystem):

21
likes
130
pub points
81%
popularity

Publisher

verified publisherserge.software

Cross-platform File & Directory that works in all platforms (browsers, Flutter, and VM)

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0, BSD-3-Clause (LICENSE)

Dependencies

meta

More

Packages that depend on universal_file