Skip to content
Search file systems with glob patterns using the D programming language
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
examples
source
test
tools
.gitignore
ChangeLog
LICENSE
README.md
TODO.md
dub.json

README.md

D Glob

Search file systems with glob patterns using the D programming language

Example

import std.stdio : stdout;
import glob : glob, globRegex;


// Use glob to search by glob pattern
foreach (entry ; glob("/usr/*/python*")) {
	stdout.writefln("%s", entry);
}

/*
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python3
/usr/bin/python3.5
/usr/lib/python2.7
/usr/lib/python3
/usr/lib/python3.5
*/

// Use globRegex to search by regex pattern
foreach (entry ; globRegex(`^/proc/[0-9]*$`)) {
	stdout.writefln("%s", entry);
}
/*
/proc/111
/proc/245
/proc/19533
/proc/1
*/

Documentation

https://workhorsy.github.io/d-glob/0.4.0/

Generate documentation

dub --build=docs

Run unit tests

dub test

Dub version Dub downloads License

You can’t perform that action at this time.