{"id":28645836,"url":"https://github.com/tobischw/dart_app_data","last_synced_at":"2025-07-28T17:07:40.203Z","repository":{"id":41950679,"uuid":"204356245","full_name":"tobischw/dart_app_data","owner":"tobischw","description":"Dart Package for getting commonly used locations for storage on Windows, Mac, and Linux, such as the app data directories.","archived":false,"fork":false,"pushed_at":"2022-04-22T18:10:41.000Z","size":24,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T01:48:59.528Z","etag":null,"topics":["appdata","dart","linux","storage"],"latest_commit_sha":null,"homepage":"","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/tobischw.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":"2019-08-25T22:21:30.000Z","updated_at":"2022-04-22T18:10:44.000Z","dependencies_parsed_at":"2022-08-12T00:22:07.113Z","dependency_job_id":null,"html_url":"https://github.com/tobischw/dart_app_data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tobischw/dart_app_data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobischw%2Fdart_app_data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobischw%2Fdart_app_data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobischw%2Fdart_app_data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobischw%2Fdart_app_data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobischw","download_url":"https://codeload.github.com/tobischw/dart_app_data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobischw%2Fdart_app_data/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267552097,"owners_count":24106000,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["appdata","dart","linux","storage"],"created_at":"2025-06-13T01:41:58.203Z","updated_at":"2025-07-28T17:07:40.186Z","avatar_url":"https://github.com/tobischw.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tobischw/dart_app_data.svg?branch=master)](https://travis-ci.org/tobischw/dart_app_data)\n# dart_app_data\nDart Package for getting commonly used locations for storage on Windows, Mac, and Linux, such as the app data directories.\n\nInspired by [path_provider](https://pub.dev/packages/path_provider) (this does the same, except for Dart CLI apps or libs).\n\nOriginally written for a locally cached repository (think .m2 cache for Java). Tested and working on Windows, Mac, and Linux. **Flutter is not supported.**\n\n## Notice\nNot tested on Windows 7/Vista/older, this library could use improvements! It's also a bit overkill for what basically amounts to a Platform.is()... call and a simple string concatenation, so I am looking for ideas on features to add. You can also just take a look at Locator.dart and copy the code from there instead of pulling in the entire package.\n\n## How to Install\nAdd this to your package's pubspec.yaml file:\n\n```yml\ndependencies:\n  dart_app_data: ^1.0.1\n```\n\n## Usage\n### With AppData\n```dart\nimport 'package:dart_app_data/dart_app_data.dart';\n...\n\n// Creates a folder if it does not already exist (only call once).\nfinal myData = AppData.findOrCreate('.my_app');\n\n// Get the location of the folder as a String\nprint(myData.path); // Outputs: C:\\Users\\MyUsername\\AppData\\Roaming\\.my_app\n\n// Get the location of the folder directly as a directory\nprint(myData.directory);\n\n// Get the name of the cache\nprint(myData.name); // Outputs: .my_app\n\n// ... Do whatever you want with the folder now.\n// Want to delete it?\n// myData.delete();\n```\n### Without AppData\n```dart\nimport 'package:dart_app_data/src/locator.dart';\n...\n\n// No need for the AppData abstraction? Use the Locator helper.\nprint(Locator.getPlatformSpecificCachePath()); \n// Outputs: C:\\Users\\MyUsername\\AppData\\Roaming\n```\n# Troubleshooting\n```\nLocatorException: App caches are not supported for mobile devices\n```\nAs the message says, this package is only for Dart applications that run on a traditional\noperating system (such as Windows, Linux, Mac).\n\n```\nLocatorException: The user application path for this platform (\"$path\") does not exist on this system\n```\nSomething went wrong during the path discovery (i.e.: the path does not exist). Is the app running as root? Did you a delete a common path somehow (see below)? Submit an Issue if this persists.\n\n```\nLocatorException: Platform-specific cache path for platform \"$os\" was not found\n```\nThis means you're on an unsupported operating system.\n\n# Paths\n* Windows: C:\\Users\\MyUsername\\AppData\\Roaming\n* macOS: /MyUsername/Library/Application Support\n* Linux: /MyUsername/user/\n\n# License\nSee `LICENSE` in repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobischw%2Fdart_app_data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobischw%2Fdart_app_data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobischw%2Fdart_app_data/lists"}