Document the format of the globset tuple arguments (#298)
This commit is contained in:
parent
e215e2c09f
commit
557efab1c4
|
@ -14,9 +14,12 @@ use crate::ignore::{IgnoreFile, IgnoreFilterer};
|
||||||
/// A path-only filterer based on globsets.
|
/// A path-only filterer based on globsets.
|
||||||
///
|
///
|
||||||
/// This filterer mimics the behavior of the `watchexec` v1 filter, but does not match it exactly,
|
/// This filterer mimics the behavior of the `watchexec` v1 filter, but does not match it exactly,
|
||||||
/// due to differing internals. It is intended to be used as a stopgap until the tagged filterer
|
/// due to differing internals. It is intended to be used as a stopgap until the "tagged" filterer
|
||||||
/// or another advanced filterer, reaches a stable state or becomes the default. As such it does not
|
/// or another advanced filterer, reaches a stable state or becomes the default. As such it does not
|
||||||
/// have an updatable configuration.
|
/// have an updatable configuration.
|
||||||
|
///
|
||||||
|
/// While it is experimental, the ["tagged" filterer](crate::filter::tagged) is generally easier
|
||||||
|
/// and more intuitive to use in code for new applications.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct GlobsetFilterer {
|
pub struct GlobsetFilterer {
|
||||||
origin: PathBuf,
|
origin: PathBuf,
|
||||||
|
@ -33,6 +36,10 @@ impl GlobsetFilterer {
|
||||||
/// second is used to ignore paths (matching paths will fail the pattern). If the filter list is
|
/// second is used to ignore paths (matching paths will fail the pattern). If the filter list is
|
||||||
/// empty, only the ignore list will be used. If both lists are empty, the filter always passes.
|
/// empty, only the ignore list will be used. If both lists are empty, the filter always passes.
|
||||||
///
|
///
|
||||||
|
/// Ignores and filters are passed as a tuple of the glob pattern as a string and an optional
|
||||||
|
/// path of the folder the pattern should apply in (e.g. the folder a gitignore file is in).
|
||||||
|
/// A `None` to the latter will mark the pattern as being global.
|
||||||
|
///
|
||||||
/// The extensions list is used to filter files by extension.
|
/// The extensions list is used to filter files by extension.
|
||||||
///
|
///
|
||||||
/// Non-path events are always passed.
|
/// Non-path events are always passed.
|
||||||
|
|
Loading…
Reference in New Issue