ignore

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

    ignore
    gitignore
    glob
    Download zip
    Author
    Version
    0.1.1
    License
    Apache-2.0
    Last updated
    7 hours ago
    Downloads
    18

    Dependencies

    #sennenki/ignore

    Ignore

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

    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
    )

    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
    )

    default_options

    fn default_options() -> IgnoreOptions

    ignore

    fn ignore(options? : IgnoreOptions) -> Ignore

    is_path_valid

    fn is_path_valid(pathname : String) -> Bool

    options

    fn options(allow_relative_paths? : Bool) -> IgnoreOptions

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io