57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
;; convert stuff to a number if possible
(define (any->number val)
(cond
((number? val) val)
((string? val) (string->number val))
((symbol? val) (any->number (symbol->string val)))
(else #f)))
;;======================================================================
;; System stuff
;;======================================================================
(define (get-df path)
(let* ((df-results (cmd-run->list (conc "df " path)))
|
>
>
>
>
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
;; convert stuff to a number if possible
(define (any->number val)
(cond
((number? val) val)
((string? val) (string->number val))
((symbol? val) (any->number (symbol->string val)))
(else #f)))
(define (any->number-if-possible val)
(let ((num (any->number val)))
(if num num val)))
;;======================================================================
;; System stuff
;;======================================================================
(define (get-df path)
(let* ((df-results (cmd-run->list (conc "df " path)))
|