find
Version, currently 2.0.02 versions
- 2.0.0latestApr 8, 2022
- 1.0.0not indexedJul 8, 2022
github.com/wyhaines/find.cr
No description declared in shard.yml.
3 stars
1 dependent
License: MIT
Installation
# Add this to your shard.yml
dependencies:
find:
github: wyhaines/find.cr
version: ~> 2.0.0Then run:
shards installshard.yml
- Crystal
*- License
- MIT
- Author
- Kirk Haines
Dependencies
Development Dependencies
- ameba~> 0.14github: crystal-ameba/amebadev
README
find.cr
This shard is inspired by the Ruby module:
https://ruby-doc.org/stdlib-2.7.2/libdoc/find/rdoc/index.html
It implements a simple API for the top down traversal of a set of paths, and it provides a convenience method for a simple-to-use matching system that depends on Crystal's file matching syntax.
Installation
-
Add the dependency to your
shard.yml:dependencies: find: github: wyhaines/find.cr
Usage
require "find"
The API is simple.
require 'find'
total_size = 0
Find.find(ENV["HOME"]) do |path|
if File.directory?(path)
if File.basename(path).start_with?('.')
Find.prune # Don't look any further into this directory.
else
next
end
end
total_size += FileTest.size(path)
end
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
2.0.0- Tagged
- Apr 8, 2022
- Commit
188449fcae7e- Crystal
*- Indexed
- yes
Dependents
Repository
github.com/wyhaines/find.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 2