Rules to filter files from a directory.

directory_glob

globs files from a directory by relative path.

Usage:

directory_glob(
    name = "foo",
    directory = ":directory",
    srcs = ["foo/bar"],
    data = ["foo/**"],
    exclude = ["foo/**/*.h"]
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
srcsA list of globs to files within the directory to put in the files.

For example, srcs = ["foo/**"] would collect the file at <directory>/foo into the files.
List of stringsoptional[]
dataA list of globs to files within the directory to put in the runfiles.

For example, data = ["foo/**"] would collect all files contained within <directory>/foo into the runfiles.
List of stringsoptional[]
allow_emptyIf true, allows globs to not match anything.BooleanoptionalFalse
directory-Labelrequired
excludeA list of globs to files within the directory to exclude from the files and runfiles.List of stringsoptional[]