aboutsummaryrefslogtreecommitdiff
path: root/module/hnh
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-04-12 13:25:53 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-04-21 21:16:45 +0200
commit1354b574aaf99006cf521a5c9ea13dd8359d76a1 (patch)
tree1d3e577dff9708a1c4517d3c0716a62c5f8960f3 /module/hnh
parentUse module-introspection more. (diff)
downloadcalp-1354b574aaf99006cf521a5c9ea13dd8359d76a1.tar.gz
calp-1354b574aaf99006cf521a5c9ea13dd8359d76a1.tar.xz
Add procedure file-hidden?.
Diffstat (limited to 'module/hnh')
-rw-r--r--module/hnh/util/path.scm6
1 files changed, 6 insertions, 0 deletions
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))))