doc: Document ‘assume-valid-file-name’ in ‘local-file’.
* doc/guix.texi (G-Expressions): Document the use of assume-valid-file-name with local-file. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I132f78e198cbf3ba2e5a677d671563d753de534cmaster
parent
be868f69aa
commit
0efa1daad3
|
@ -12192,6 +12192,18 @@ When @var{recursive?} is true, call @code{(@var{select?} @var{file}
|
||||||
absolute file name and @var{stat} is the result of @code{lstat}; exclude
|
absolute file name and @var{stat} is the result of @code{lstat}; exclude
|
||||||
entries for which @var{select?} does not return true.
|
entries for which @var{select?} does not return true.
|
||||||
|
|
||||||
|
@var{file} can be wrapped in the @code{assume-valid-file-name} syntactic
|
||||||
|
keyword. When this is done, there will not be a warning when
|
||||||
|
@code{local-file} is used with a non-literal path. The path is still
|
||||||
|
looked up relative to the current working directory at run time.
|
||||||
|
Wrapping is done like this:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(define alice-key-file-path "alice.pub")
|
||||||
|
;; ...
|
||||||
|
(local-file (assume-valid-file-name alice-key-file-path))
|
||||||
|
@end lisp
|
||||||
|
|
||||||
This is the declarative counterpart of the @code{interned-file} monadic
|
This is the declarative counterpart of the @code{interned-file} monadic
|
||||||
procedure (@pxref{The Store Monad, @code{interned-file}}).
|
procedure (@pxref{The Store Monad, @code{interned-file}}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
Reference in New Issue