wobsite.Files
class pub Files
A type that tracks the source and output directories, along with all the source files.
Fields
source
let pub @source: Path
The directory containing the source files.
output
let pub @output: Path
The directory to store the built files in.
Instance methods
clone
Show source codeHide source code
fn pub clone -> Files {
Files(
source: @source.clone,
output: @output.clone,
files: @files.clone,
hashes: @hashes.clone,
)
}
fn pub clone -> Files
Creates a clone of self
.
matching
Show source codeHide source code
fn pub matching(pattern: String) -> Stream[ref Path] {
let root = pattern.starts_with?('/')
@files.iter.select(fn (path) {
fnmatch.match(pattern, '/${path.strip_prefix(@source).get}', root)
})
}
fn pub matching(pattern: String) -> Stream[ref Path]
Returns an iterator that yields all the source files matching the given
fnmatch(3)
pattern.
Implemented traits
Clone
impl Clone[Files] for Files