Add File .isAbsolute and the default #inst/#uuid data readers
jfile lacked .isAbsolute (path starts with /). clojure.core/default-data-readers and *data-readers* were nil, so a library merging them (aero's reader opts) couldn't resolve #inst. Define them keyed by symbol, like Clojure.
This commit is contained in:
parent
b2394325d4
commit
7947918919
2 changed files with 9 additions and 0 deletions
|
|
@ -100,6 +100,7 @@
|
|||
((string=? name "exists") (list (if (file-exists? p) #t #f)))
|
||||
((string=? name "isDirectory") (list (if (file-directory? p) #t #f)))
|
||||
((string=? name "isFile") (list (if (and (file-exists? p) (not (file-directory? p))) #t #f)))
|
||||
((string=? name "isAbsolute") (list (if (and (> (string-length p) 0) (char=? (string-ref p 0) #\/)) #t #f)))
|
||||
((string=? name "listFiles") (list (list->cseq (map make-jfile (jolt-list-dir p)))))
|
||||
((string=? name "getParent")
|
||||
(let loop ((i (- (string-length p) 1)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue