unix_disk_space 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

Unix Disk Space #

Get free disk space info from df, Works on Unix-based systems.

Usage #

A simple usage example:

import 'package:unix_disk_space/unix_disk_space.dart';

void main() async {
  final disks = await diskSpace();
  print(disks);

  final fs = await diskSpace.fs('tmpfs');
  print(fs);

  final file = await diskSpace.file('/bin/bash');
  print(file);
}

Get disk info for each filesystem.

final output = await diskSpace();

Get disk info for specified filesystem.

final output = await diskSpace.fs('tmpfs');

Get disk info for filesystem the given file is part of.

final output = await diskSpace.file('./');

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.1.0 #

  • Initial version, created by Stagehand

example/unix_disk_space_example.dart

import 'package:unix_disk_space/unix_disk_space.dart';

void main() async {
  final disks = await diskSpace();
  print(disks);

  final fs = await diskSpace.fs('tmpfs');
  print(fs);

  final file = await diskSpace.file('/bin/bash');
  print(file);

  final wd = await diskSpace.file('.');
  print(wd);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  unix_disk_space: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:unix_disk_space/unix_disk_space.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:unix_disk_space/unix_disk_space.dart that imports:
  • package:unix_disk_space/src/unix_disk_space.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:unix_disk_space/unix_disk_space.dart that imports:
  • package:unix_disk_space/src/unix_disk_space.dart that imports:
  • dart:io

Health suggestions

Format lib/src/unix_disk_space.dart.

Run dartfmt to format lib/src/unix_disk_space.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
Dev dependencies
pedantic ^1.8.0
test ^1.6.0