1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpgscm: Add more file handling functions.

* tests/gpgscm/ffi.c (do_glob): New function.
(ffi_init): Define new function.
* tests/gpgscm/tests.scm (basename-suffix): New function.x

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-06-21 18:12:03 +02:00
parent 0340fcdac8
commit c5e0ca5a59
2 changed files with 44 additions and 0 deletions

View file

@ -185,6 +185,12 @@
path
(basename (substring path (+ 1 i) (string-length path))))))
(define (basename-suffix path suffix)
(basename
(if (string-suffix? path suffix)
(substring path 0 (- (string-length path) (string-length suffix)))
path)))
;; Helper for (pipe).
(define :read-end car)
(define :write-end cadr)