{"id":21577634,"url":"https://github.com/harium/os-detector","last_synced_at":"2025-03-18T07:25:25.802Z","repository":{"id":57724858,"uuid":"167204078","full_name":"Harium/os-detector","owner":"Harium","description":"Lightweight fork of SystemUtils.java from Apache Commons Lang","archived":false,"fork":false,"pushed_at":"2019-01-23T15:32:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T14:14:38.075Z","etag":null,"topics":["apache-commons","detect","java","os","system-utils"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Harium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-23T15:17:46.000Z","updated_at":"2019-01-29T13:23:22.000Z","dependencies_parsed_at":"2022-09-11T20:10:50.255Z","dependency_job_id":null,"html_url":"https://github.com/Harium/os-detector","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/Harium%2Fos-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harium%2Fos-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harium%2Fos-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harium%2Fos-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harium","download_url":"https://codeload.github.com/Harium/os-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244174944,"owners_count":20410595,"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":["apache-commons","detect","java","os","system-utils"],"created_at":"2024-11-24T13:07:49.995Z","updated_at":"2025-03-18T07:25:25.779Z","avatar_url":"https://github.com/Harium.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# os-detector\nLightweight fork of SystemUtils.java from Apache Commons Lang\n\n## Maven\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.harium.util\u003c/groupId\u003e\n    \u003cartifactId\u003eos-detector\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Usage\nUse it as Apache Commons Lang:\n\n```java\nif (SystemUtils.IS_OS_WINDOWS) {\n    // do something\n} else {\n    // do something\n}\n```\n\nOr with OSDetector:\n```java\nif (OS.Linux == OSDetector.getOS()) {\n    // do something\n} else {\n    // do something\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharium%2Fos-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharium%2Fos-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharium%2Fos-detector/lists"}