store: Clarify documentation of 'valid-path?'.
* guix/store.scm (valid-path?): Improve docstring. * doc/guix.texi (The Store): Update accordingly.
This commit is contained in:
		
							parent
							
								
									0043558082
								
							
						
					
					
						commit
						06b76acceb
					
				
					 2 changed files with 14 additions and 2 deletions
				
			
		|  | @ -2913,7 +2913,14 @@ Procedures that make RPCs all take a server object as their first | |||
| argument. | ||||
| 
 | ||||
| @deffn {Scheme Procedure} valid-path? @var{server} @var{path} | ||||
| Return @code{#t} when @var{path} is a valid store path. | ||||
| @cindex invalid store items | ||||
| Return @code{#t} when @var{path} designates a valid store item and | ||||
| @code{#f} otherwise (an invalid item may exist on disk but still be | ||||
| invalid, for instance because it is the result of an aborted or failed | ||||
| build.) | ||||
| 
 | ||||
| A @code{&nix-protocol-error} condition is raised if @var{path} is not | ||||
| prefixed by the store directory (@file{/gnu/store}). | ||||
| @end deffn | ||||
| 
 | ||||
| @deffn {Scheme Procedure} add-text-to-store @var{server} @var{name} @var{text} [@var{references}] | ||||
|  |  | |||
|  | @ -582,7 +582,12 @@ encoding conversion errors." | |||
|     (operation (name args ...) docstring return ...))) | ||||
| 
 | ||||
| (define-operation (valid-path? (string path)) | ||||
|   "Return #t when PATH is a valid store path." | ||||
|   "Return #t when PATH designates a valid store item and #f otherwise (an | ||||
| invalid item may exist on disk but still be invalid, for instance because it | ||||
| is the result of an aborted or failed build.) | ||||
| 
 | ||||
| A '&nix-protocol-error' condition is raised if PATH is not prefixed by the | ||||
| store directory (/gnu/store)." | ||||
|   boolean) | ||||
| 
 | ||||
| (define-operation (query-path-hash (store-path path)) | ||||
|  |  | |||
		Reference in a new issue