{"id":21116922,"url":"https://github.com/gilnobrega/universal_disk_space","last_synced_at":"2026-01-11T04:49:52.913Z","repository":{"id":48488101,"uuid":"359215080","full_name":"gilnobrega/universal_disk_space","owner":"gilnobrega","description":"A dart package which shows total and available space of disks in Linux and Windows","archived":false,"fork":false,"pushed_at":"2023-04-02T17:45:20.000Z","size":74,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2023-08-20T23:27:39.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gilnobrega.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-18T17:51:25.000Z","updated_at":"2022-12-10T07:30:15.000Z","dependencies_parsed_at":"2022-09-10T15:20:41.350Z","dependency_job_id":null,"html_url":"https://github.com/gilnobrega/universal_disk_space","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilnobrega%2Funiversal_disk_space","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilnobrega%2Funiversal_disk_space/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilnobrega%2Funiversal_disk_space/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilnobrega%2Funiversal_disk_space/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilnobrega","download_url":"https://codeload.github.com/gilnobrega/universal_disk_space/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225458471,"owners_count":17477451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T02:37:00.316Z","updated_at":"2026-01-11T04:49:52.885Z","avatar_url":"https://github.com/gilnobrega.png","language":"Dart","readme":"# Universal Disk Space\nA Dart package which parses total and available disk spaces on Windows and UNIX-based systems (including Linux and macOS).\n\n## Usage\nAdd ``universal_disk_space`` as a dependency to your project's ``pubspec.yaml`` file.\n\n## Example\n\n``` dart\nimport 'dart:io';\n\nimport 'package:universal_disk_space/universal_disk_space.dart';\n\nFuture\u003cvoid\u003e main() async {\n  // Initializes the DiskSpace class.\n  final diskSpace = DiskSpace();\n\n  // Scan for disks in the system.\n  await diskSpace.scan();\n\n  // A list of disks in the system.\n  var disks = diskSpace.disks;\n\n  // Prints the device path, mount path, and total size of each disk in system.\n  for (final disk in disks) {\n    print(disk.devicePath); // e.g.: 'C:\\' in Windows or '/dev/sdc' in Linux\n    print(disk\n        .mountPath); // e.g.: 'C:\\' or '\\\\nasdrive' in Windows or '/' in Linux\n    print(disk.totalSize.toString()); // in bytes\n    print(disk.usedSpace.toString()); // in bytes\n    print(disk.availableSpace.toString()); // in bytes\n    print('');\n  }\n\n  /// Searches for the disk that '/home' belongs to.\n  /// Any FileSystemEntity can be used.\n  var homeDisk = diskSpace.getDisk(Directory('/home'));\n  print(homeDisk);\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilnobrega%2Funiversal_disk_space","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilnobrega%2Funiversal_disk_space","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilnobrega%2Funiversal_disk_space/lists"}