mozilla/rust — pull request #5832 by doy (2013-04-11 01:11:23+00:00)
Title: glob.h bindings

This adds low level bindings for `glob()` and `globfree()` in `libc`, and adds a static `glob()` function to `Path` which uses those. It has only been tested on Linux/x86_64, but I looked up header file definitions for other platforms, so they should hopefully work in theory. Windows doesn't have these functions, so that is currently unimplemented, although ideally `Path::glob()` could be reimplemented in terms of Windows primitives instead, at some point in the future.

I'm not sure what a good way to test this would be - it requires looking at the actual filesystem, so I'm not sure where a safe place to do that would be. I'd be willing to add some if people have recommendations.