summaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-15 11:51:16 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-15 15:26:30 +0200
commit1ec32f4a9d35f235a9947f288370af1445f8ab8b (patch)
treed046fc2f0f6c6052e43e84311df6adb27484b92c /doc/guix.texi
parent0fb9a15bb5faf34214689810ff98b23a4295f04e (diff)
store: Add #:select? parameter to 'add-to-store'.
* guix/store.scm (write-arg): Remove 'file' case. (true): New procedure. (add-to-store): Add #:select? parameter and honor it. Use hand-coded stub instead of 'operation'. (interned-file): Add #:select? parameter and honor it. * doc/guix.texi (The Store Monad): Adjust 'interned-file' documentation accordingly.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 18a1960cf7..97c01be213 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3502,7 +3502,7 @@ resulting text file refers to; it defaults to the empty list.
@end deffn
@deffn {Monadic Procedure} interned-file @var{file} [@var{name}] @
- [#:recursive? #t]
+ [#:recursive? #t] [#:select? (const #t)]
Return the name of @var{file} once interned in the store. Use
@var{name} as its store name, or the basename of @var{file} if
@var{name} is omitted.
@@ -3511,6 +3511,11 @@ When @var{recursive?} is true, the contents of @var{file} are added
recursively; if @var{file} designates a flat file and @var{recursive?}
is true, its contents are added, and its permission bits are kept.
+When @var{recursive?} is true, call @code{(@var{select?} @var{file}
+@var{stat})} for each directory entry, where @var{file} is the entry's
+absolute file name and @var{stat} is the result of @code{lstat}; exclude
+entries for which @var{select?} does not return true.
+
The example below adds a file to the store, under two different names:
@example