{"id":21846623,"url":"https://github.com/binarybirds/path-kit","last_synced_at":"2025-03-21T16:44:26.092Z","repository":{"id":63905912,"uuid":"257243589","full_name":"BinaryBirds/path-kit","owner":"BinaryBirds","description":"Working with files and directories in a nice way using Swift.","archived":false,"fork":false,"pushed_at":"2022-02-17T15:17:03.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T11:43:42.725Z","etag":null,"topics":["swift","swift-5"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"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/BinaryBirds.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-04-20T10:15:50.000Z","updated_at":"2024-09-10T06:10:32.000Z","dependencies_parsed_at":"2022-11-28T19:42:31.209Z","dependency_job_id":null,"html_url":"https://github.com/BinaryBirds/path-kit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fpath-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fpath-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fpath-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fpath-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryBirds","download_url":"https://codeload.github.com/BinaryBirds/path-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244831062,"owners_count":20517621,"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":["swift","swift-5"],"created_at":"2024-11-27T23:14:45.452Z","updated_at":"2025-03-21T16:44:26.067Z","avatar_url":"https://github.com/BinaryBirds.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PathKit (💾)\n\nWorking with files and directories in a nice way using Swift.\n\n## Usage\n\nSome examples:\n\n```swift\nimport PathKit\n\nlet caches = Path.systemDirectory(for: .caches)\nlet home = Path.home\nlet parent = home.parent\nlet root = Path.root\nlet current = Path.current\nlet test = current.child(\"test\")\n\nprint(test.isDirectory)\nprint(test.children().filter(\\.isFile))\n\ndo {\n    let work = try home.add(\"my-work-dir\")\n    print(work.location)\n\n    try test.delete()\n    try test.create()\n    \n    let a = current.child(\"a\")\n    try a.create()\n    \n    let b = current.child(\"b\")\n    let c = current.child(\"c\")\n    let d = current.child(\"d\")\n\n    try a.copy(to: b)\n    try a.link(to: c)\n    try a.move(to: d, force: true)\n}\ncatch {\n    print(error.localizedDescription)\n}\n```\n\n\n\n## Install\n\nJust use the Swift Package Manager as usual:\n\n```swift\n.package(url: \"https://github.com/binarybirds/path-kit\", from: \"1.0.0\"),\n```\n\nDon't forget to add \"PathKit\" to your target as a dependency!\n\n```swift\n.product(name: \"PathKit\", package: \"path-kit\"),\n```\n\nThat's it.\n\n\n## License\n\n[WTFPL](LICENSE) - Do what the fuck you want to.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fpath-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarybirds%2Fpath-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fpath-kit/lists"}