diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-06-16 00:06:27 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-16 09:34:32 +0200 |
| commit | 0687fc9cd98e38feab80e2f9c8044e77ad52c7fd (patch) | |
| tree | d7e4b82bb0325a433a0d6e5123297b9459291825 /doc | |
| parent | 07c8a98c3b45dca9fd36af7c4a300d3af58734dd (diff) | |
gexp: Add #:select? parameter to 'local-file'.
* guix/gexp.scm (<local-file>)[select?]: New field.
(true): New procedure.
(%local-file): Add #:select? and honor it.
(local-file): Likewise.
* tests/gexp.scm ("local-file, #:select?"): New test.
* doc/guix.texi (G-Expressions): Adjust accordingly.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index f85221d0653..227d8614825 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -3804,7 +3804,7 @@ does not have any effect on what the G-expression does. | |||
| 3804 | content is directly passed as a string. | 3804 | content is directly passed as a string. |
| 3805 | 3805 | ||
| 3806 | @deffn {Scheme Procedure} local-file @var{file} [@var{name}] @ | 3806 | @deffn {Scheme Procedure} local-file @var{file} [@var{name}] @ |
| 3807 | [#:recursive? #f] | 3807 | [#:recursive? #f] [#:select? (const #t)] |
| 3808 | Return an object representing local file @var{file} to add to the store; this | 3808 | Return an object representing local file @var{file} to add to the store; this |
| 3809 | object can be used in a gexp. If @var{file} is a relative file name, it is looked | 3809 | object can be used in a gexp. If @var{file} is a relative file name, it is looked |
| 3810 | up relative to the source file where this form appears. @var{file} will be added to | 3810 | up relative to the source file where this form appears. @var{file} will be added to |
| @@ -3814,6 +3814,11 @@ When @var{recursive?} is true, the contents of @var{file} are added recursively; | |||
| 3814 | designates a flat file and @var{recursive?} is true, its contents are added, and its | 3814 | designates a flat file and @var{recursive?} is true, its contents are added, and its |
| 3815 | permission bits are kept. | 3815 | permission bits are kept. |
| 3816 | 3816 | ||
| 3817 | When @var{recursive?} is true, call @code{(@var{select?} @var{file} | ||
| 3818 | @var{stat})} for each directory entry, where @var{file} is the entry's | ||
| 3819 | absolute file name and @var{stat} is the result of @code{lstat}; exclude | ||
| 3820 | entries for which @var{select?} does not return true. | ||
| 3821 | |||
| 3817 | This is the declarative counterpart of the @code{interned-file} monadic | 3822 | This is the declarative counterpart of the @code{interned-file} monadic |
| 3818 | procedure (@pxref{The Store Monad, @code{interned-file}}). | 3823 | procedure (@pxref{The Store Monad, @code{interned-file}}). |
| 3819 | @end deffn | 3824 | @end deffn |
