-1
doc/functions.md
-1
doc/functions.md
-48
doc/functions/fileset.section.md
-48
doc/functions/fileset.section.md
···-<!-- TODO: Render this document in front of function documentation in case https://github.com/nix-community/nixdoc/issues/19 is ever supported -->-The [`lib.fileset`](#sec-functions-library-fileset) library allows you to work with _file sets_.-A file set is a mathematical set of local files that can be added to the Nix store for use in Nix derivations.-File sets are easy and safe to use, providing obvious and composable semantics with good error messages to prevent mistakes.-See the [function reference](#sec-functions-library-fileset) for function-specific documentation.-All functions accepting file sets as arguments can also accept [paths](https://nixos.org/manual/nix/stable/language/values.html#type-path) as arguments.-- A path to a directory turns into a file set containing all files _recursively_ in that directory.-Because of this, a path to a directory that contains no files (recursively) will turn into a file set containing no files.-Only the [`toSource`](#function-library-lib.fileset.toSource) function adds files to the Nix store, and only those files contained in the `fileset` argument.-This is in contrast to using [paths in string interpolation](https://nixos.org/manual/nix/stable/language/values.html#type-path), which does add the entire referenced path to the store.-Here's a listing of which files get included when different path expressions get coerced to file sets:-- `./.` as a file set contains both `a/x` and `a/b/y` (`c/` does not contain any files and is therefore omitted).
···
+49
lib/fileset/default.nix
+49
lib/fileset/default.nix
···+The [`lib.fileset`](#sec-functions-library-fileset) library allows you to work with _file sets_.+A file set is a mathematical set of local files that can be added to the Nix store for use in Nix derivations.+File sets are easy and safe to use, providing obvious and composable semantics with good error messages to prevent mistakes.+See the [function reference](#sec-functions-library-fileset) for function-specific documentation.+All functions accepting file sets as arguments can also accept [paths](https://nixos.org/manual/nix/stable/language/values.html#type-path) as arguments.+- A path to a directory turns into a file set containing all files _recursively_ in that directory.+Because of this, a path to a directory that contains no files (recursively) will turn into a file set containing no files.+Only the [`toSource`](#function-library-lib.fileset.toSource) function adds files to the Nix store, and only those files contained in the `fileset` argument.+This is in contrast to using [paths in string interpolation](https://nixos.org/manual/nix/stable/language/values.html#type-path), which does add the entire referenced path to the store.+Here's a listing of which files get included when different path expressions get coerced to file sets:+- `./.` as a file set contains both `a/x` and `a/b/y` (`c/` does not contain any files and is therefore omitted).