From 1354b574aaf99006cf521a5c9ea13dd8359d76a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 12 Apr 2022 13:25:53 +0200 Subject: Add procedure file-hidden?. --- module/hnh/util/path.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'module/hnh/util/path.scm') diff --git a/module/hnh/util/path.scm b/module/hnh/util/path.scm index 28a026bc..0aa747d0 100644 --- a/module/hnh/util/path.scm +++ b/module/hnh/util/path.scm @@ -51,3 +51,9 @@ '(()) (string->list path))))))) (cons head (remove string-null? tail)))) + + +(define-public (file-hidden? path) + (define base (basename path)) + (and (not (string-null? base)) + (char=? #\. (string-ref base 0)))) -- cgit v1.2.3