{"id":13462653,"url":"https://github.com/kylef/PathKit","last_synced_at":"2025-03-25T05:32:10.452Z","repository":{"id":20601054,"uuid":"23881989","full_name":"kylef/PathKit","owner":"kylef","description":"Effortless path operations in Swift","archived":false,"fork":false,"pushed_at":"2024-05-16T18:30:21.000Z","size":212,"stargazers_count":1490,"open_issues_count":14,"forks_count":171,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-16T13:06:06.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylef.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-10T16:23:51.000Z","updated_at":"2025-02-17T14:42:38.000Z","dependencies_parsed_at":"2022-07-13T22:13:16.697Z","dependency_job_id":"fd826898-c7f7-432b-9311-19c2eb2b680c","html_url":"https://github.com/kylef/PathKit","commit_stats":{"total_commits":140,"total_committers":21,"mean_commits":6.666666666666667,"dds":0.6571428571428571,"last_synced_commit":"2fcd4618d52869b342e208324d455131a48f9e9b"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2FPathKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2FPathKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2FPathKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2FPathKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylef","download_url":"https://codeload.github.com/kylef/PathKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245106266,"owners_count":20561676,"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-07-31T13:00:18.191Z","updated_at":"2025-03-25T05:32:10.416Z","avatar_url":"https://github.com/kylef.png","language":"Swift","funding_links":[],"categories":["Libs","Files [🔝](#readme)","Swift","File Manage"],"sub_categories":["Files","Data Management"],"readme":"# PathKit\n\n[![Build Status](https://travis-ci.org/kylef/PathKit.svg)](https://travis-ci.org/kylef/PathKit)\n\nEffortless path operations in Swift.\n\n## Usage\n\n```swift\nlet path = Path(\"/usr/bin/swift\")\n```\n\n#### Joining paths\n\n```swift\nlet path = Path(\"/usr/bin\") + Path(\"swift\")\n```\n\n#### Determine if a path is absolute\n\n```swift\npath.isAbsolute\n```\n\n#### Determine if a path is relative\n\n```swift\npath.isRelative\n```\n\n#### Determine if a file or directory exists at the path\n\n```swift\npath.exists()\n```\n\n#### Determine if a path is a directory\n\n```swift\npath.isDirectory()\n```\n\n#### Get an absolute path\n\n```swift\nlet absolutePath = path.absolute()\n```\n\n#### Normalize a path\n\nThis cleans up any redundant `..` or `.` and double slashes in paths.\n\n```swift\nlet normalizedPath = path.normalize()\n```\n\n#### Deleting a path\n\n```swift\npath.delete()\n```\n\n#### Moving a path\n\n```swift\npath.move(newPath)\n```\n\n#### Current working directory\n\n```swift\nPath.current\nPath.current = \"/usr/bin\"\n```\n\n#### Changing the current working directory\n\n```swift\npath.chdir {\n  // Path.current would be set to path during execution of this closure\n}\n```\n\n#### Children paths\n\n```swift\npath.children()\n```\n\n#### Reading\n\n```swift\npath.read()\n```\n\n#### Writing\n\n```swift\npath.write(\"Hello World!\")\n```\n\n#### Glob\n\n```swift\nlet paths = Path.glob(\"*.swift\")\n```\n\n### Contact\n\nKyle Fuller\n\n- https://fuller.li\n- https://twitter.com/kylefuller\n\n### License\n\nPathKit is licensed under the [BSD License](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2FPathKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylef%2FPathKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2FPathKit/lists"}