diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-12 13:25:53 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-21 21:16:45 +0200 |
commit | 1354b574aaf99006cf521a5c9ea13dd8359d76a1 (patch) | |
tree | 1d3e577dff9708a1c4517d3c0716a62c5f8960f3 /module/hnh/util | |
parent | Use module-introspection more. (diff) | |
download | calp-1354b574aaf99006cf521a5c9ea13dd8359d76a1.tar.gz calp-1354b574aaf99006cf521a5c9ea13dd8359d76a1.tar.xz |
Add procedure file-hidden?.
Diffstat (limited to 'module/hnh/util')
-rw-r--r-- | module/hnh/util/path.scm | 6 |
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)))) |