70 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Common Lisp
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Common Lisp
		
	
	
	
	
	
| (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-nonwild-pathname
 | |
|            #:remove-suffix
 | |
|            #:file-or-dir-namestring))
 | |
| 
 | |
| (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-nonwild-pathname
 | |
|                 #:remove-suffix)
 | |
|   (:export #: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-nonwild-pathname)
 | |
|   (:import-from #:cl-xdg-trash/url-encode
 | |
|                 #:url-encode
 | |
|                 #:url-decode)
 | |
|   (:import-from #:cl-xdg-trash/trashinfo
 | |
|                 #:compute-trashinfo-source-file)
 | |
|   (:export #:read-directorysizes-file
 | |
|            #:prase-directorysizes
 | |
|            #:trashed-file-size))
 | |
| 
 | |
| (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))
 |