{"id":20741132,"url":"https://github.com/robtimus/application-path","last_synced_at":"2025-09-27T18:31:14.313Z","repository":{"id":118272376,"uuid":"532281741","full_name":"robtimus/application-path","owner":"robtimus","description":"Provides utility classes for querying application specific paths","archived":false,"fork":false,"pushed_at":"2024-10-09T15:26:30.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T06:41:51.955Z","etag":null,"topics":["application","java"],"latest_commit_sha":null,"homepage":"https://robtimus.github.io/application-path/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robtimus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-03T14:21:30.000Z","updated_at":"2024-10-09T15:26:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e840a49-d0e8-4e3d-89bd-ead63bbdc701","html_url":"https://github.com/robtimus/application-path","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fapplication-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fapplication-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fapplication-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fapplication-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robtimus","download_url":"https://codeload.github.com/robtimus/application-path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234452031,"owners_count":18834739,"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":["application","java"],"created_at":"2024-11-17T06:34:03.918Z","updated_at":"2025-09-27T18:31:13.989Z","avatar_url":"https://github.com/robtimus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# application-path\n\u003c!--[![Maven Central](https://img.shields.io/maven-central/v/com.github.robtimus/application-path)](https://search.maven.org/artifact/com.github.robtimus/application-path)--\u003e\n[![Build Status](https://github.com/robtimus/application-path/actions/workflows/build.yml/badge.svg)](https://github.com/robtimus/application-path/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aapplication-path\u0026metric=alert_status)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aapplication-path)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aapplication-path\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aapplication-path)\n[![Known Vulnerabilities](https://snyk.io/test/github/robtimus/application-path/badge.svg)](https://snyk.io/test/github/robtimus/application-path)\n\nProvides utility classes for querying application specific paths.\n\nFor user data or configuration, platform independent applications tend to use `\u003cuser.home\u003e/.\u003capplication\u003e` regardless of the platform. While this works fine on Linux, on Windows (and to a lesser extend macOS), this is messy. This library makes it easy to use a single API and still use platform specific paths. As a result, on Windows the user's own `AppData\\Roaming` or `AppData\\Local` folder will be used.\n\nCurrently, only the path to store user data or configuration is supported. This will use the following paths:\n\n* `$HOME/.\u003capplication\u003e` or `$HOME/.\u003corganization\u003e/\u003capplication\u003e` for Linux and Unix\n* `$HOME/Library/Application Support/\u003capplication\u003e` or `$HOME/Library/Application Support/\u003corganization\u003e/\u003capplication\u003e` for macOS\n* `%HOME%\\AppData\\Roaming\\\u003capplication\u003e`, `%HOME%\\AppData\\Roaming\\\u003corganization\u003e\\\u003capplication\u003e`, `%HOME%\\AppData\\Local\\\u003capplication\u003e` or `%HOME%\\AppData\\Local\\\u003corganization\u003e\\\u003capplication\u003e` for Windows\n\nTo retrieve the path for an application's user data or configuration, simply call `ApplicationPath.userData`:\n\n```\nPath userData1 = ApplicationPath.userData(\"My App\");\n// userData1 is $HOME/.My App on Linux, %HOME%\\AppData\\Roaming\\My App on Windows\nPath userData2 = ApplicationPath.userData(\"My Organization\", \"My App\");\n// userData2 is $HOME/.My Organization/My App on Linux, %HOME%\\AppData\\Roaming\\My Organization\\My App on Windows\n```\n\nTo use `%HOME%\\AppData\\Local` on Windows, add the `LOCAL` option:\n\n```\nPath userData1 = ApplicationPath.userData(\"My App\", UserDataOption.LOCAL);\n// userData1 is $HOME/.My App on Linux, %HOME%\\AppData\\Local\\My App on Windows\nPath userData2 = ApplicationPath.userData(\"My Organization\", \"My App\", UserDataOption.LOCAL);\n// userData2 is $HOME/.My Organization/My App on Linux, %HOME%\\AppData\\Local\\My Organization\\My App on Windows\n```\n\nNote that the `userData` methods will not create any files or directories. It is the responsibility of the caller to create the path as necessary. This can usually be done using `Files.createDirectories`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fapplication-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtimus%2Fapplication-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fapplication-path/lists"}