(defpackage :cl-xdg-trash/url-encode (:documentation "URL encoding and decoding functions.") (:use #:cl) (:export #:url-encode #:url-decode #:url-decode-error #:url-decode-error-string #:url-decode-error-index)) (defpackage :cl-xdg-trash/mountpoints (:documentation "Utility function for discovering mount points.") (:use #:cl) (:export #:list-mountpoints #:find-filesystem-root #:ensure-directory-pathname #:ensure-nonwild-pathname #:remove-suffix #:file-or-dir-namestring #:same-device-p)) (defpackage :cl-xdg-trash/trashinfo (:documentation "Parser and utility functions for dealing with .trashinfo files.") (:use #:cl) (:import-from #:cl-xdg-trash/url-encode #:url-encode #:url-decode) (:import-from #:cl-xdg-trash/mountpoints #:file-or-dir-namestring #:ensure-directory-pathname #:ensure-nonwild-pathname #:remove-suffix #:find-filesystem-root) (:export #:directory-as-file-pathname #:parent-directory #:trashinfo-format-error #:trashinfo-format-error-message #:trashinfo-format-error-line-numer #:trashinfo-format-error-context #:trashinfo-format-error-source-file #:trashinfo #:trashinfo-trash-directory #:trashinfo-name #:trashinfo-original-path #:trashinfo-deletion-date #:trashinfo-info-file #:trashinfo-trashed-file #:compute-trashinfo-source-file #:parse-trashinfo-from-stream #:parse-trashinfo-file #:format-trashinfo #:make-trashinfo-for)) (defpackage :cl-xdg-trash/directorysizes (:documentation "Parser and utility functions for dealing with the directorysizes file.") (:use #:cl) (:import-from #:cl-xdg-trash/mountpoints #:ensure-directory-pathname #:ensure-nonwild-pathname #:file-or-dir-namestring) (:import-from #:cl-xdg-trash/url-encode #:url-encode #:url-decode) (:import-from #:cl-xdg-trash/trashinfo #:trashinfo-name #:compute-trashinfo-source-file #:parent-directory #:directory-as-file-pathname) (:export #:list-directory #:read-directorysizes-file #:prase-directorysizes #:read-directorysizes-for-trash-directory #:write-directorysizes-for-trash-directory #:trashed-file-size #:calculate-directorysizes-path #:prune-directorysizes)) (defpackage :cl-xdg-trash (:documentation "Common Lisp interface to the XDG trash specification.") (:use #:cl #:cl-xdg-trash/trashinfo #:cl-xdg-trash/url-encode #:cl-xdg-trash/mountpoints #:cl-xdg-trash/directorysizes) (:export #:xdg-data-home #:user-home-trash-directory #:valid-toplevel-trash-dir-p #:list-toplevel-trash-directories #:list-trash-directories #:trash-directory-for-file #:trash-file #:list-trashed-files #:restore-file #:empty-file #:empty-all #:trash-directory-size))