https://github.com/ctongfei/poly-io
The missing I/O library for Scala
https://github.com/ctongfei/poly-io
io scala
Last synced: over 1 year ago
JSON representation
The missing I/O library for Scala
- Host: GitHub
- URL: https://github.com/ctongfei/poly-io
- Owner: ctongfei
- License: mit
- Created: 2015-10-05T16:56:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-21T03:26:53.000Z (over 9 years ago)
- Last Synced: 2025-01-07T21:17:05.504Z (over 1 year ago)
- Topics: io, scala
- Language: Scala
- Homepage:
- Size: 67.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Poly-io
[](https://travis-ci.org/ctongfei/poly-io)
[](https://maven-badges.herokuapp.com/maven-central/me.tongfei/poly-io_2.12)
[](https://www.javadoc.io/doc/me.tongfei/poly-io_2.12)
`Poly-io` is a lightweight (no-dependencies), typesafe and easy-to-use library for file system I/O in Scala (2.11/2.12).
```scala
libraryDependencies += "me.tongfei" %% "poly-io" % "0.3.2"
```
### Features
##### Fluent idiomatic-Scala style file I/O
```scala
import poly.io.Local._
val lines = File("/usr/local/...").lines // type: Iterable[String]
val li = File("/home/foo/bar.gz") decompress Gzip decode Codec.ISOLatin1 linesIterator // type: Iterator[String]
```
##### Typesafe (dependent-type based) filesystem manipulation
```scala
val files = Local.Directory("/home/foo/a").recursiveChildren // type: Iterable[Local.Path]
val zipFile = files.find(_.name endsWith "zip").get
val z = ZipArchive(zipFile)
val filesInZip = z.root.recursiveChildren // type: Iterable[z.Path]
```
### Documentation
TODO