struct

Hwaro::Services::ContentWalk::Ignore

Inherits Struct < Value < Object

[content] ignore rules bound to the content root they are written against (content/ beside the config that holds them), answering for paths under one walked directory. A walk of a subdirectory (-c content/blog) still matches blog/b.md, and a directory outside that root is matched by none of its rules.

Paths spelled under the walked directory (what its glob yields) take a string prefix instead of expand_path, which costs a getcwd per call — on a walk of thousands of files that was most of the time.

Constructors

new(rules : Models::ContentFilesConfig, root : String, dir : String)
Source
none
Source

Instance methods

empty?
Source
ignored?(path : String) : Bool

True when path (as the tools spell it) is hidden.

Source
rules
Source
with_rules(rules : Models::ContentFilesConfig) : Ignore

The same root and walked directory, other rules.

Source