Search results

There are no results.

wobsite.Files

type 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 code
Hide source code
fn pub clone -> uni Files {
  recover {
    Files(
      source: @source.clone,
      output: @output.clone,
      files: @files.clone,
      hashes: @hashes.clone,
    )
  }
}
fn pub clone -> uni Files

Creates a clone of self.

The returned value is an owned value that is the same type as the receiver of this method. For example, cloning a ref Array[Int] results in a Array[Int], not another ref Array[Int].

matching

Show source code
Hide 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

std.clone.

Clone

impl Clone for Files