Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pvorb/hamill
actor style file walker
https://github.com/pvorb/hamill
Last synced: about 1 month ago
JSON representation
actor style file walker
- Host: GitHub
- URL: https://github.com/pvorb/hamill
- Owner: pvorb
- License: mit
- Created: 2012-12-25T00:58:28.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-02T15:26:33.000Z (over 11 years ago)
- Last Synced: 2024-04-14T22:22:12.702Z (7 months ago)
- Language: Scala
- Homepage: http://pvorb.github.io/hamill/
- Size: 500 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hamill
======[Akka]-based walking of arbitrary directory trees.
Download
--------If you are using SBT, you can add the package by adding the following lines to
your `build.sbt` file.~~~ scala
libraryDependencies += "de.vorb" %% "hamill" % "0.3.0"
~~~Usage Example
-------------~~~ scala
import de.vorb.hamill._import akka.actor._
import akka.pattern.ask
import akka.util.Timeoutimport java.nio.file.FileSystems
import scala.concurrent.duration._
import scala.concurrent.Awaitobject Example extends App {
val root = FileSystems.getDefault().getPath("src", "")val tracing = new Tracing
val future = tracing.walkFileTree(root, (path: PathContainer) => {
path match {
case File(f, Left(err)) =>
println("error in file " + f)
case File(f, Right(attrs)) =>
println(f + ", " + attrs)
case Directory(d, attrs) =>
println(d + ", " + attrs)
}
})Await.result(future, 5 minutes)
tracing.system.shutdown()
}
~~~API
---See the [current Scaladoc API][api].
[api]: http://pvorb.github.com/hamill/api/current/#de.vorb.hamill.package
[Akka]: http://akka.io/License
-------Copyright © 2013 Paul Vorbach
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.