Filter only 4-digit files or symlinks.
This commit is contained in:
parent
0e5b59cab0
commit
6e614feab3
1 changed files with 21 additions and 6 deletions
|
@ -119,15 +119,30 @@
|
|||
;; Returns dictionary containing only records with either 4-digit
|
||||
;; name or one of its aliases being 4-digit.
|
||||
(define (files-dictionary-filter-4digit-symbols d)
|
||||
d)
|
||||
(let loop ((keys (dict-keys d))
|
||||
(res (make-dict)))
|
||||
(if (null? keys)
|
||||
res
|
||||
(let* ((key (car keys))
|
||||
(val (dict-ref d key)))
|
||||
(loop (cdr keys)
|
||||
(if (list-contains-4digit-symbol? (cons key val))
|
||||
(dict-set res key val)
|
||||
res))))))
|
||||
|
||||
;; Returns a dictionary containing file-name, symlinks, id and info
|
||||
;; keys. The info key contains whatever load-member-file from the
|
||||
;; member-file module returns. The id key contains whatever is the
|
||||
;; first 4-digit symbol in (cons fname aliases) list.
|
||||
(define (members-base-load-member mdir fname aliases)
|
||||
#f)
|
||||
|
||||
(define (load-members dn)
|
||||
;; get the directory contents
|
||||
(let ((fss (files+symlinks->files-dictionary
|
||||
(get-files+symlinks dn))))
|
||||
(print (map length fss)))
|
||||
;; filter all ids
|
||||
;; resolve links (it might be unknown!)
|
||||
(let ((fss (files-dictionary-filter-4digit-symbols
|
||||
(files+symlinks->files-dictionary
|
||||
(get-files+symlinks dn)))))
|
||||
(void))
|
||||
;; load member files
|
||||
1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue