{"id":22958223,"url":"https://github.com/akiomik/cats-nio-file","last_synced_at":"2025-08-13T04:33:19.093Z","repository":{"id":37987482,"uuid":"198015549","full_name":"akiomik/cats-nio-file","owner":"akiomik","description":"A thin scala wrapper for Java NIO.2, built on cats-effect 🐱","archived":false,"fork":false,"pushed_at":"2023-06-19T23:08:40.000Z","size":169,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T21:46:16.590Z","etag":null,"topics":["cats","cats-effect","java-nio"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/akiomik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["akiomik"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-07-21T05:21:33.000Z","updated_at":"2023-05-19T10:42:42.000Z","dependencies_parsed_at":"2023-02-19T03:00:19.912Z","dependency_job_id":null,"html_url":"https://github.com/akiomik/cats-nio-file","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiomik%2Fcats-nio-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiomik%2Fcats-nio-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiomik%2Fcats-nio-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiomik%2Fcats-nio-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akiomik","download_url":"https://codeload.github.com/akiomik/cats-nio-file/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229737355,"owners_count":18116454,"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":["cats","cats-effect","java-nio"],"created_at":"2024-12-14T17:37:17.476Z","updated_at":"2024-12-14T17:37:18.064Z","avatar_url":"https://github.com/akiomik.png","language":"Scala","funding_links":["https://github.com/sponsors/akiomik"],"categories":[],"sub_categories":[],"readme":"# cats-nio-file\n\n[![Latest version](https://index.scala-lang.org/akiomik/cats-nio-file/cats-nio-file/latest.svg?color=blue\u0026style=flat)](https://index.scala-lang.org/akiomik/cats-nio-file/cats-nio-file)\n[![Scala CI](https://github.com/akiomik/cats-nio-file/workflows/Scala%20CI/badge.svg)](https://github.com/akiomik/cats-nio-file/actions?query=workflow%3A%22Scala+CI%22)\n\nA thin scala wrapper for Java NIO.2, built on [cats-effect](https://typelevel.org/cats-effect/) 🐱\n\n## Getting started\n\ncats-nio-file is currently available for Scala 2.12, 2.13 and 3.2.\n\nAdd the following lines to your `build.sbt`.\n\n```scala\nlibraryDependencies += \"io.github.akiomik\" %% \"cats-nio-file\" % \"1.10.0\"\n```\n\nNOTE: The groupid has been changed from `com.github.akiomik` to `io.github.akiomik` because the maven repository has been changed from bintray to sonatype.\n\n## All releases\n\ncats-nio-file supports some different versions of cats-effect.\n\n| cats-nio-file version | cats-effect version | scala version       |\n| --------------------- | ------------------- | ------------------- |\n| 1.0.1                 | 2.0.x               | 2.12.x/2.13.x       |\n| 1.1.0                 | 2.1.x               | 2.12.x/2.13.x       |\n| 1.2.0                 | 2.2.x               | 2.12.x/2.13.x       |\n| 1.3.0                 | 2.3.x               | 2.12.x/2.13.x       |\n| 1.4.0                 | 3.0.x               | 2.12.x/2.13.x       |\n| 1.5.0                 | 3.1.x               | 2.12.x/2.13.x       |\n| 1.6.1                 | 3.2.x               | 2.12.x/2.13.x/3.0.x |\n| 1.7.0                 | 3.3.x               | 2.12.x/2.13.x/3.1.x |\n| 1.8.1                 | 3.3.x               | 2.12.x/2.13.x/3.2.x |\n| 1.9.0                 | 3.4.x               | 2.12.x/2.13.x/3.2.x |\n| 1.10.0                | 3.5.x               | 2.12.x/2.13.x/3.2.x |\n\n## Usage\n\n```scala\nimport java.util.stream.{Stream =\u003e JStream}\nimport java.nio.file.{Path, Paths}\nimport java.nio.file.attribute.PosixFilePermission\nimport scala.collection.mutable\n\nimport cats.effect.{IO, Resource}\nimport cats.nio.file.Files\n\n// File I/O operations are wrapped with `F[_]` (e.g. `IO`)\nval exists: IO[Boolean] = Files[IO].exists(Paths.get(\"build.sbt\"))\n\n// Java collections are converted to Scala collections through `scala.jdk.CollectionConverters`\nval perms: IO[mutable.Set[PosixFilePermission]] = Files[IO].getPosixFilePermissions(Paths.get(\"build.sbt\"))\n\n// `IO[JStream[A]]` values are able to convert to `Resource`\nimport cats.nio.file.implicits._\nval list: Resource[IO, JStream[Path]] = Files[IO].list(Paths.get(\".\")).resource\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiomik%2Fcats-nio-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakiomik%2Fcats-nio-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiomik%2Fcats-nio-file/lists"}