ignore

    A library for parsing and matching ignore files, such as .gitignore, .dockerignore, etc.

    ignore
    gitignore
    glob
    Download zip
    Version
    0.0.1
    License
    Apache-2.0
    Last updated
    last month
    Downloads
    19

    Dependencies

    #sennenki/ignore

    Ignore

    pub struct Ignore {
    rules : Array[IgnoreRule]
    strict_path_check : Bool
    }

    Ignore::Ignore

    fn Ignore::Ignore(options? : IgnoreOptions) -> Ignore

    Ignore::add

    fn Ignore::add(self : Ignore, pattern : String) -> Ignore

    Ignore::add_file

    fn Ignore::add_file(self : Ignore, path : String) -> Ignore raise
    IOError

    Ignore::add_lines

    fn Ignore::add_lines(self : Ignore, patterns : String) -> Ignore

    Ignore::add_patterns

    fn Ignore::add_patterns(self : Ignore, patterns : Array[String]) -> Ignore

    Ignore::check_ignore

    fn Ignore::check_ignore(self : Ignore, pathname : String) -> MatchResult

    Ignore::filter

    fn Ignore::filter(self : Ignore, pathnames : Array[String]) -> Array[String]

    Ignore::ignores

    fn Ignore::ignores(self : Ignore, pathname : String) -> Bool

    Ignore::match_path

    fn Ignore::match_path(self : Ignore, pathname : String) -> MatchResult

    IgnoreOptions

    pub struct IgnoreOptions {
    allow_relative_paths : Bool
    } derive(Eq,
    Debug
    )

    IgnoreOptions::IgnoreOptions

    fn IgnoreOptions::IgnoreOptions(allow_relative_paths? : Bool) -> IgnoreOptions

    IgnoreRule

    pub struct IgnoreRule {
    raw : String
    pattern : String
    negative : Bool
    directory_only : Bool
    anchored : Bool
    has_slash : Bool
    segments : Array[String]
    } derive(Eq,
    Debug
    )

    MatchResult

    pub struct MatchResult {
    ignored : Bool
    unignored : Bool
    rule : IgnoreRule?
    } derive(Eq,
    Debug
    )

    is_path_valid

    fn is_path_valid(pathname : String) -> Bool

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io