From daee794759a81a06b8b1ff0ae9f762c8e1ec97bc Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 5 Feb 2022 14:28:54 +0100 Subject: [PATCH] - changed variable name. --- src/filesystem-tree-window.lisp | 26 +++++++++++++++----------- src/kami/client.lisp | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/filesystem-tree-window.lisp b/src/filesystem-tree-window.lisp index ed8f259..96fc158 100644 --- a/src/filesystem-tree-window.lisp +++ b/src/filesystem-tree-window.lisp @@ -93,17 +93,21 @@ :documentation "function with two parameter the path and a feature to query Valid feature values are :size. Returns nil if Returns nil if the path does not point to an actual file.") - (filesystem-list-all-file-paths-function + (filesystem-collect-tree :initform #'fs:collect-tree - :accessor filesystem-list-all-file-paths-function + :accessor filesystem-collect-tree :type function :documentation "function with a single parameter, the - path. Returns a list of path to all the reachable files from the - argument as root directory e.g - (funcall filesystem-list-all-file-paths-function \"foo/\") - ; => (foo/bar/baz - foo/a/b - ...)") + path. Returns a two values a list of path to all the reachable files from the + argument as root directory and a list of the paths to all directory reachable from the root + e.g + (funcall filesystem-collect-tree \"foo/\") + ; => (values (foo/bar/baz + foo/a/b + ...) + (foo/bar/ + foo/a/ + ...)") (filesystem-close-connection-function :initform (constantly t) :accessor filesystem-close-connection-function @@ -131,8 +135,8 @@ (getf handlers-plist :filesystem-upload-function)) (setf (filesystem-query-path-function object) (getf handlers-plist :filesystem-query-path-function)) - (setf (filesystem-list-all-file-paths-function object) - (getf handlers-plist :filesystem-list-all-file-paths-function)) + (setf (filesystem-collect-tree object) + (getf handlers-plist :filesystem-collect-tree)) (setf (filesystem-close-connection-function object) (getf handlers-plist :filesystem-close-connection-function))) object) @@ -454,7 +458,7 @@ (declare (ignore filename file-count all-files-number))))) (with-accessors ((root-node filesystem-root) (filesystem-expand-function filesystem-expand-function) - (list-all-file-function filesystem-list-all-file-paths-function)) + (list-all-file-function filesystem-collect-tree)) window (let* ((matching-node (find-node root-node path)) (filep (not (tree-dir-p (data matching-node))))) diff --git a/src/kami/client.lisp b/src/kami/client.lisp index 09acf91..cd2571a 100644 --- a/src/kami/client.lisp +++ b/src/kami/client.lisp @@ -182,7 +182,7 @@ :filesystem-download-function (download-node *stream* *root-fid*) :filesystem-upload-function (upload-node *stream* *root-fid*) :filesystem-query-path-function (query-path *stream* *root-fid*) - :filesystem-list-all-file-paths-function (collect-tree *stream* *root-fid*) + :filesystem-collect-tree (collect-tree *stream* *root-fid*) :filesystem-close-connection-function (lambda () (9p:close-client socket))))))