about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--doc/index.md1
-rw-r--r--mk/crates.mk3
-rw-r--r--src/libextra/lib.rs1
-rw-r--r--src/libglob/lib.rs (renamed from src/libextra/glob.rs)11
-rw-r--r--src/test/run-pass/glob-std.rs3
6 files changed, 14 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index cc4f185bafd..a4d7203c2b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,6 +77,7 @@ src/.DS_Store
 /doc/arena
 /doc/extra
 /doc/flate
+/doc/glob
 /doc/green
 /doc/native
 /doc/rustc
diff --git a/doc/index.md b/doc/index.md
index bfd81a1d85f..d3270a96d80 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -39,6 +39,7 @@ li {list-style-type: none; }
 
 * [The `arena` allocation library](arena/index.html)
 * [The `flate` compression library](flate/index.html)
+* [The `glob` file path matching library](glob/index.html)
 
 # Tooling
 
diff --git a/mk/crates.mk b/mk/crates.mk
index c865a37b8ec..a8f14bab1e8 100644
--- a/mk/crates.mk
+++ b/mk/crates.mk
@@ -49,7 +49,7 @@
 # automatically generated for all stage/host/target combinations.
 ################################################################################
 
-TARGET_CRATES := std extra green rustuv native flate arena
+TARGET_CRATES := std extra green rustuv native flate arena glob
 HOST_CRATES := syntax rustc rustdoc rustpkg
 CRATES := $(TARGET_CRATES) $(HOST_CRATES)
 TOOLS := compiletest rustpkg rustdoc rustc
@@ -65,6 +65,7 @@ DEPS_rustdoc := rustc native:sundown
 DEPS_rustpkg := rustc
 DEPS_flate := std native:miniz
 DEPS_arena := std extra
+DEPS_glob := std
 
 TOOL_DEPS_compiletest := extra green rustuv
 TOOL_DEPS_rustpkg := rustpkg green rustuv
diff --git a/src/libextra/lib.rs b/src/libextra/lib.rs
index 6e3f5fd4b95..bb89915dfd1 100644
--- a/src/libextra/lib.rs
+++ b/src/libextra/lib.rs
@@ -67,7 +67,6 @@ pub mod ebml;
 pub mod getopts;
 pub mod json;
 pub mod tempfile;
-pub mod glob;
 pub mod term;
 pub mod time;
 pub mod base64;
diff --git a/src/libextra/glob.rs b/src/libglob/lib.rs
index fb760685254..98bf5533210 100644
--- a/src/libextra/glob.rs
+++ b/src/libglob/lib.rs
@@ -23,6 +23,11 @@
  * `glob`/`fnmatch` functions.
  */
 
+#[crate_id = "glob#0.10-pre"];
+#[crate_type = "rlib"];
+#[crate_type = "dylib"];
+#[license = "MIT/ASL2"];
+
 use std::{os, path};
 use std::io;
 use std::io::fs;
@@ -53,7 +58,7 @@ pub struct Paths {
 /// `puppies.jpg` and `hamsters.gif`:
 ///
 /// ```rust
-/// use extra::glob::glob;
+/// use glob::glob;
 ///
 /// for path in glob("/media/pictures/*.jpg") {
 ///     println!("{}", path.display());
@@ -297,7 +302,7 @@ impl Pattern {
      * # Example
      *
      * ```rust
-     * use extra::glob::Pattern;
+     * use glob::Pattern;
      *
      * assert!(Pattern::new("c?t").matches("cat"));
      * assert!(Pattern::new("k[!e]tteh").matches("kitteh"));
@@ -537,7 +542,7 @@ impl MatchOptions {
 #[cfg(test)]
 mod test {
     use std::os;
-    use super::*;
+    use super::{glob, Pattern, MatchOptions};
 
     #[test]
     fn test_absolute_pattern() {
diff --git a/src/test/run-pass/glob-std.rs b/src/test/run-pass/glob-std.rs
index 655bc777193..9e724d86df5 100644
--- a/src/test/run-pass/glob-std.rs
+++ b/src/test/run-pass/glob-std.rs
@@ -12,8 +12,9 @@
 // xfail-win32 TempDir may cause IoError on windows: #10462
 
 extern mod extra;
+extern mod glob;
 
-use extra::glob::glob;
+use glob::glob;
 use extra::tempfile::TempDir;
 use std::unstable::finally::Finally;
 use std::{os, unstable};