mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-21 08:50:51 +01:00
- added function 'fs:path-referencing-dir-p'.
This commit is contained in:
parent
1d2d528d95
commit
1cf9be1863
@ -32,7 +32,8 @@
|
||||
|
||||
(in-package :modules)
|
||||
|
||||
(defparameter *expand-abbrev-rewriting-rules* '(("^!g" "gemini://"))
|
||||
(defparameter *expand-abbrev-rewriting-rules* '(("^!g" "gemini://")
|
||||
("^!n" "np://"))
|
||||
"Before displaying messages that module will rewrites the first
|
||||
element of each item (a regular expression) of this list with the second
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
(not dirp))
|
||||
(list :path path :dirp dirp :markedp nil))
|
||||
(dirp
|
||||
(if (scan "/$" path)
|
||||
(if (fs:path-referencing-dir-p path)
|
||||
(list :path path :dirp t :markedp nil)
|
||||
(list :path (strcat path "/") :dirp t :markedp nil)))))
|
||||
|
||||
|
@ -152,6 +152,9 @@
|
||||
(defun loopback-reference-dir-p (path)
|
||||
(string= (path-last-element path) "."))
|
||||
|
||||
(defun path-referencing-dir-p (path)
|
||||
(cl-ppcre:scan "/$" path))
|
||||
|
||||
(defun collect-files/dirs (root)
|
||||
(let ((all-files '())
|
||||
(all-dirs '()))
|
||||
|
@ -85,7 +85,7 @@
|
||||
(assert path)
|
||||
(with-cloned-root-fid (*stream* root-fid)
|
||||
(if dirp
|
||||
(9p:create-path *stream* root-fid (if (cl-ppcre:scan "/$" path)
|
||||
(9p:create-path *stream* root-fid (if (fs:path-referencing-dir-p path)
|
||||
path
|
||||
(text-utils:strcat path "/")))
|
||||
(9p:create-path *stream* root-fid path))))))
|
||||
|
@ -289,6 +289,7 @@
|
||||
:collect-children
|
||||
:backreference-dir-p
|
||||
:loopback-reference-dir-p
|
||||
:path-referencing-dir-p
|
||||
:collect-files/dirs
|
||||
:prepend-pwd
|
||||
:search-matching-file
|
||||
|
Loading…
x
Reference in New Issue
Block a user