pub fn add_patterns_file<T>(
patterns: &mut Vec<List<T>>,
source: PathBuf,
follow_symlinks: bool,
root: Option<&Path>,
buf: &mut Vec<u8>,
parse: T,
) -> Result<bool, Error>where
T: Pattern,Available on crate feature
excludes only.Expand description
Add the given file at source if it exists, otherwise do nothing.
If a root is provided, it’s not considered a global file anymore.
parse is a way to parse bytes to pattern.
Returns true if the file was added, or false if it didn’t exist.