From 1ec32f4a9d35f235a9947f288370af1445f8ab8b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 11:51:16 +0200 Subject: 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. --- doc/guix.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') 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 -- cgit v1.2.3