mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-16 19:57:39 -05:00
utils: Add 'symbolic-link?'.
* guix/build/utils.scm (symbolic-link?): New procedure.
This commit is contained in:
parent
d68fe74162
commit
9741aca9a5
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,7 @@ (define-module (guix build utils)
|
|||
|
||||
directory-exists?
|
||||
executable-file?
|
||||
symbolic-link?
|
||||
call-with-ascii-input-file
|
||||
elf-file?
|
||||
ar-file?
|
||||
|
@ -93,6 +94,10 @@ (define (executable-file? file)
|
|||
(and s
|
||||
(not (zero? (logand (stat:mode s) #o100))))))
|
||||
|
||||
(define (symbolic-link? file)
|
||||
"Return #t if FILE is a symbolic link (aka. \"symlink\".)"
|
||||
(eq? (stat:type (lstat file)) 'symlink))
|
||||
|
||||
(define (call-with-ascii-input-file file proc)
|
||||
"Open FILE as an ASCII or binary file, and pass the resulting port to
|
||||
PROC. FILE is closed when PROC's dynamic extent is left. Return the
|
||||
|
|
Loading…
Reference in a new issue