union
lib.fileset.union
Docs pulled from | This Revision | about 1 hour ago
The file set containing all files that are in either of two given file sets.
This is the same as unions
,
but takes just two file sets instead of a list.
See also Union (set theory).
The given file sets are evaluated as lazily as possible, with the first argument being evaluated first if needed.
Inputs
fileset1
-
The first file set. This argument can also be a path, which gets implicitly coerced to a file set.
fileset2
-
The second file set. This argument can also be a path, which gets implicitly coerced to a file set.
Type
union :: FileSet -> FileSet -> FileSet
Examples
lib.fileset.union
usage example
# Create a file set containing the file `Makefile`
# and all files recursively in the `src` directory
union ./Makefile ./src
# Create a file set containing the file `Makefile`
# and the LICENSE file from the parent directory
union ./Makefile ../LICENSE
Noogle detected
Implementation
The following is the current implementation of this function.
union =
fileset1: fileset2:
_unionMany (
_coerceMany "lib.fileset.union" [
{
context = "First argument";
value = fileset1;
}
{
context = "Second argument";
value = fileset2;
}
]
);