wfile 0.3.2 copy "wfile: ^0.3.2" to clipboard
wfile: ^0.3.2 copied to clipboard

A package for convenient work with files and their contents across multiple platforms.

WFile #

Cover - WFile

The package for convenient work with files and their contents across multiple platforms. Independent of the various system delimiters. Well-tested Dart package.

Usage #

Read Files #

const sourcePath = 'path/prefix';
// const sourcePath = ['path', 'prefix'];
final f = WFile(sourcePath);

// get a varios content from files with respect to [sourcePath]
content = f.readAsText('text.txt');
content = f.readAsBytes('bytes.bin');
content = f.readAsImage('images/1/happy.png');       // -> path/prefix/images/happy.png
content = f.readAsImage(['images', 1, 'happy.png']); // -> path/prefix/images/happy.png
content = f.readAsJsonMap('map.json');               // <- { ... }
content = f.readAsJsonList('list.json');             // <- [ ... ]
content = f.readAsXml('data.xml');                   // <- <data attr="...">...</data>

Write Files #

const sourcePath = 'path/prefix';
// const sourcePath = ['path', 'prefix'];
final f = WFile(sourcePath);

// get a varios content from files with respect to [sourcePath]
f.writeAsText(content, 'text.txt');
f.writeAsBytes(content, 'bytes.bin');
f.writeAsImage(content, 'images/1/happy.png');       // -> path/prefix/images/happy.png
f.writeAsImage([content, 'images', 1, 'happy.png']); // -> path/prefix/images/happy.png
f.writeAsJsonMap(content, 'map.json');               // <- { ... }
f.writeAsJsonList(content, 'list.json');             // <- [ ... ]
f.writeAsXml(content, 'data.xml');                   // <- <data attr="...">...</data>

License #

MIT

TODO #

  • All feautures for this package into README.
  • Filesystem brokers.
1
likes
0
pub points
31%
popularity

Publisher

verified publishersyrokomskyi.com

A package for convenient work with files and their contents across multiple platforms.

Repository (GitHub)
View/report issues

Topics

#files #xml #loader #filesystem #crossplatform

License

unknown (LICENSE)

Dependencies

image, path, test, xml

More

Packages that depend on wfile