aboutsummaryrefslogtreecommitdiff
path: root/module/hnh/util/path.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/hnh/util/path.scm')
-rw-r--r--module/hnh/util/path.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/hnh/util/path.scm b/module/hnh/util/path.scm
index 0aa747d0..49b53897 100644
--- a/module/hnh/util/path.scm
+++ b/module/hnh/util/path.scm
@@ -57,3 +57,6 @@
(define base (basename path))
(and (not (string-null? base))
(char=? #\. (string-ref base 0))))
+
+(define-public (filename-extension filename)
+ (car (reverse (string-split filename #\.))))