mirror of https://codeberg.org/cage/tinmop/
- removed dependency on osicat.
This commit is contained in:
parent
f2a8635b3e
commit
4d65bc200a
49
LICENSES.org
49
LICENSES.org
|
@ -1,3 +1,52 @@
|
||||||
|
- src/os-utils.lisp
|
||||||
|
uses code from osicat
|
||||||
|
|
||||||
|
Copyright © Nikodemus Siivola
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
- src/fylesystem-utils
|
||||||
|
|
||||||
|
uses code from osicat
|
||||||
|
|
||||||
|
Copyright © Nikodemus Siivola
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
- src/gemini/dummy-server.lisp
|
- src/gemini/dummy-server.lisp
|
||||||
|
|
||||||
derived from:
|
derived from:
|
||||||
|
|
|
@ -47,10 +47,10 @@ See: complete:directory-complete")
|
||||||
(defun underlying-directory-p (pathname)
|
(defun underlying-directory-p (pathname)
|
||||||
"Find the actual directory of pathname (i.e. resolve file link"
|
"Find the actual directory of pathname (i.e. resolve file link"
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(case (file-kind pathname)
|
(case (fs:file-kind pathname)
|
||||||
(:directory t)
|
(:directory t)
|
||||||
(:symbolic-link
|
(:symbolic-link
|
||||||
(file-kind (merge-pathnames (read-link pathname) pathname))))))
|
(fs:file-kind (merge-pathnames (fs:read-link pathname) pathname))))))
|
||||||
|
|
||||||
;;; We can't easily do zsh-style tab-completion of ~us into ~user, but
|
;;; We can't easily do zsh-style tab-completion of ~us into ~user, but
|
||||||
;;; at least we can expand ~ and ~user. The other bug here at the
|
;;; at least we can expand ~ and ~user. The other bug here at the
|
||||||
|
@ -67,7 +67,9 @@ to the appropriate home directory."
|
||||||
return i))
|
return i))
|
||||||
(suffix (and slash-index (subseq string slash-index)))
|
(suffix (and slash-index (subseq string slash-index)))
|
||||||
(uname (subseq string 1 slash-index))
|
(uname (subseq string 1 slash-index))
|
||||||
(homedir (or (cdr (assoc :home (user-info uname)))
|
(user-info (ignore-errors (os-utils:user-info uname)))
|
||||||
|
(homedir (if user-info
|
||||||
|
(os-utils:user-info-home user-info)
|
||||||
(chop (namestring
|
(chop (namestring
|
||||||
(or (probe-file (user-homedir-pathname))
|
(or (probe-file (user-homedir-pathname))
|
||||||
(return-from tilde-expand-string
|
(return-from tilde-expand-string
|
||||||
|
@ -80,29 +82,27 @@ to the appropriate home directory."
|
||||||
completed) and the common prefix of the completion string."
|
completed) and the common prefix of the completion string."
|
||||||
(when (text-utils:string-not-empty-p string)
|
(when (text-utils:string-not-empty-p string)
|
||||||
(let* ((namestring (tilde-expand-string string))
|
(let* ((namestring (tilde-expand-string string))
|
||||||
(name-dir (if (file-exists-p namestring)
|
(name-dir (if (fs:file-exists-p namestring)
|
||||||
(fs:parent-dir-path namestring)
|
(fs:parent-dir-path namestring)
|
||||||
namestring))
|
namestring))
|
||||||
(dir (pathname->directory-pathname namestring))
|
(dir (pathname->directory-pathname namestring))
|
||||||
(namefun (if (relative-pathname-p string)
|
(namefun (if (fs:relative-pathname-p string)
|
||||||
#'namestring
|
#'namestring
|
||||||
(lambda (x) (namestring (merge-pathnames x))))))
|
(lambda (x) (namestring (merge-pathnames x))))))
|
||||||
(unless (and (underlying-directory-p dir)
|
(unless (and (underlying-directory-p dir)
|
||||||
(not (wild-pathname-p dir)))
|
(not (wild-pathname-p dir)))
|
||||||
(return-from directory-complete (values nil 0)))
|
(return-from directory-complete (values nil 0)))
|
||||||
(with-directory-iterator (next dir)
|
(format t "~a~%" dir)
|
||||||
(when-let* ((all (loop
|
(let* ((all (mapcar (lambda (a) (funcall namefun a))
|
||||||
for entry = (next)
|
(fs:collect-children dir)))
|
||||||
while entry collect
|
(candidates (sort (remove-if-not (lambda (a)
|
||||||
(funcall namefun entry)))
|
(text-utils:string-starts-with-p name-dir
|
||||||
(candidates (sort (remove-if-not (lambda (a)
|
a))
|
||||||
(text-utils:string-starts-with-p name-dir
|
all)
|
||||||
a))
|
(lambda (a b) (< (length a)
|
||||||
all)
|
(length b))))))
|
||||||
(lambda (a b) (< (length a)
|
(values candidates
|
||||||
(length b))))))
|
(reduce-to-common-prefix candidates))))))
|
||||||
(values candidates
|
|
||||||
(reduce-to-common-prefix candidates)))))))
|
|
||||||
|
|
||||||
(defun starts-with-clsr (hint)
|
(defun starts-with-clsr (hint)
|
||||||
(lambda (a)
|
(lambda (a)
|
||||||
|
|
|
@ -73,6 +73,61 @@
|
||||||
:if-does-not-exist :create)
|
:if-does-not-exist :create)
|
||||||
(write-sequence seq stream)))
|
(write-sequence seq stream)))
|
||||||
|
|
||||||
|
(defun absolute-pathname-p (pathname)
|
||||||
|
(not (relative-pathname-p pathname)))
|
||||||
|
|
||||||
|
(defun relative-pathname-p (pathname)
|
||||||
|
(uiop:relative-pathname-p pathname))
|
||||||
|
|
||||||
|
(defun file-kind (namestring &key (follow-p t))
|
||||||
|
(let ((mode (nix:stat-mode (if follow-p
|
||||||
|
(nix:stat namestring)
|
||||||
|
(nix:lstat namestring)))))
|
||||||
|
(cond
|
||||||
|
((nix:s-isdir mode)
|
||||||
|
:directory)
|
||||||
|
((nix:s-ischr mode)
|
||||||
|
:character-device)
|
||||||
|
((nix:s-isblk mode)
|
||||||
|
:block-device)
|
||||||
|
((nix:s-isreg mode)
|
||||||
|
:regular-file)
|
||||||
|
((nix:s-islnk mode)
|
||||||
|
:symbolic-link)
|
||||||
|
((nix:s-issock mode)
|
||||||
|
:socket)
|
||||||
|
((nix:s-isfifo mode)
|
||||||
|
:pipe)
|
||||||
|
(t
|
||||||
|
(error "uknown file type for ~a" namestring)))))
|
||||||
|
|
||||||
|
(defun current-directory ()
|
||||||
|
(uiop:getcwd))
|
||||||
|
|
||||||
|
(defun absolute-pathname (pathspec
|
||||||
|
&optional (default *default-pathname-defaults*))
|
||||||
|
"Returns an absolute pathname corresponding to PATHSPEC by
|
||||||
|
merging it with DEFAULT, and (CURRENT-DIRECTORY) if necessary."
|
||||||
|
(if (relative-pathname-p pathspec)
|
||||||
|
(let ((tmp (merge-pathnames
|
||||||
|
pathspec
|
||||||
|
(make-pathname :name nil :type nil :version nil
|
||||||
|
:defaults default))))
|
||||||
|
(if (relative-pathname-p tmp)
|
||||||
|
(merge-pathnames tmp (current-directory))
|
||||||
|
tmp))
|
||||||
|
pathspec))
|
||||||
|
|
||||||
|
(defun read-link (pathspec)
|
||||||
|
"Returns the pathname pointed to by the symbolic link
|
||||||
|
designated by PATHSPEC. If the link is relative, then the
|
||||||
|
returned pathname is relative to the link, not
|
||||||
|
*DEFAULT-PATHNAME-DEFAULTS*.
|
||||||
|
|
||||||
|
Signals an error if PATHSPEC is wild, or does not designate a
|
||||||
|
symbolic link."
|
||||||
|
(pathname (nix:readlink (absolute-pathname pathspec))))
|
||||||
|
|
||||||
(defun create-file (file &key (skip-if-exists nil))
|
(defun create-file (file &key (skip-if-exists nil))
|
||||||
"create file and parent dir, if necessary"
|
"create file and parent dir, if necessary"
|
||||||
(when (not (and skip-if-exists
|
(when (not (and skip-if-exists
|
||||||
|
@ -144,15 +199,13 @@
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(handler-case
|
(handler-case
|
||||||
(flet ((read-dir ()
|
(flet ((read-dir ()
|
||||||
(when-let* ((,dir-name (nix:readdir ,dir))
|
(when-let* ((,dir-name (nix:dirent-name (nix:readdir ,dir)))
|
||||||
(,new-path (cat-parent-dir ,root ,dir-name)))
|
(,new-path (cat-parent-dir ,root ,dir-name)))
|
||||||
,new-path)))
|
,new-path)))
|
||||||
(do ((,var (read-dir) (read-dir)))
|
(do ((,var (read-dir) (read-dir)))
|
||||||
((not ,var) ())
|
((not ,var) ())
|
||||||
,@body))
|
,@body))
|
||||||
(nix::enotdir () 0)
|
(error () 0))
|
||||||
(nix:eacces () 0)
|
|
||||||
(nix:eloop () 0))
|
|
||||||
(nix:closedir ,dir)))))
|
(nix:closedir ,dir)))))
|
||||||
|
|
||||||
(defun collect-children (parent-dir)
|
(defun collect-children (parent-dir)
|
||||||
|
@ -247,8 +300,16 @@
|
||||||
(match root-directory)
|
(match root-directory)
|
||||||
matched)))
|
matched)))
|
||||||
|
|
||||||
|
(cffi:defcfun (ffi-realpath "realpath")
|
||||||
|
:string
|
||||||
|
(path :pointer)
|
||||||
|
(resolved-path :pointer))
|
||||||
|
|
||||||
(defun relative-file-path->absolute (path)
|
(defun relative-file-path->absolute (path)
|
||||||
(nix:realpath path))
|
(cffi:with-foreign-string (ptr-path path)
|
||||||
|
(let ((resolved ""))
|
||||||
|
(cffi:with-foreign-string (ptr-resolved resolved)
|
||||||
|
(ffi-realpath ptr-path ptr-resolved)))))
|
||||||
|
|
||||||
(defun regular-file-p (path)
|
(defun regular-file-p (path)
|
||||||
(nix:s-isreg (nix:stat-mode (nix:stat path))))
|
(nix:s-isreg (nix:stat-mode (nix:stat path))))
|
||||||
|
@ -345,14 +406,15 @@
|
||||||
(num:fnv-hash-32 (slurp-file file :convert-to-string nil)))
|
(num:fnv-hash-32 (slurp-file file :convert-to-string nil)))
|
||||||
|
|
||||||
(defun file-outdated-p (file &rest dependencies)
|
(defun file-outdated-p (file &rest dependencies)
|
||||||
(handler-bind ((nix:enoent #'(lambda (c)
|
(handler-case
|
||||||
(declare (ignore c))
|
|
||||||
(invoke-restart 'use-value nil))))
|
|
||||||
(let ((mtime-file (get-stat-mtime file))
|
(let ((mtime-file (get-stat-mtime file))
|
||||||
(mtimes-deps (remove-if #'null (mapcar #'get-stat-mtime dependencies))))
|
(mtimes-deps (remove-if #'null (mapcar #'get-stat-mtime dependencies))))
|
||||||
(if mtime-file
|
(if mtime-file
|
||||||
(remove-if #'(lambda (mtime) (<= mtime mtime-file)) mtimes-deps)
|
(remove-if #'(lambda (mtime) (<= mtime mtime-file)) mtimes-deps)
|
||||||
t))))
|
t))
|
||||||
|
(nix:syscall-error (e)
|
||||||
|
(declare (ignore e))
|
||||||
|
nil)))
|
||||||
|
|
||||||
(defun file-exists-p (f)
|
(defun file-exists-p (f)
|
||||||
(uiop:file-exists-p f))
|
(uiop:file-exists-p f))
|
||||||
|
@ -371,15 +433,22 @@
|
||||||
(with-open-file (stream f :element-type '(unsigned-byte 8))
|
(with-open-file (stream f :element-type '(unsigned-byte 8))
|
||||||
(file-length stream))))
|
(file-length stream))))
|
||||||
|
|
||||||
(defun home-dir (&key (add-separator-ends nil))
|
(cffi:defcfun ("mkstemps" ffi-mkstemps) :int
|
||||||
(let ((home (os-utils:getenv "HOME")))
|
(template :pointer)
|
||||||
(if add-separator-ends
|
(suffix-length :int))
|
||||||
(text-utils:strcat home *directory-sep*)
|
|
||||||
home)))
|
(defun mkstemps (template suffix &optional (filler "XXXXXX"))
|
||||||
|
(let ((actual-template (concatenate 'string
|
||||||
|
template
|
||||||
|
filler
|
||||||
|
suffix)))
|
||||||
|
(cffi:with-foreign-string (ptr-template actual-template)
|
||||||
|
(values (ffi-mkstemps ptr-template (length suffix))
|
||||||
|
(cffi:foreign-string-to-lisp ptr-template)))))
|
||||||
|
|
||||||
(defun %mkstemp (prefix suffix)
|
(defun %mkstemp (prefix suffix)
|
||||||
(multiple-value-bind (fd path)
|
(multiple-value-bind (fd path)
|
||||||
(nix:mkstemps prefix suffix)
|
(mkstemps prefix suffix)
|
||||||
(nix:close fd)
|
(nix:close fd)
|
||||||
path))
|
path))
|
||||||
|
|
||||||
|
@ -466,8 +535,40 @@
|
||||||
(dolist (temporary-directory *temporary-directories-created*)
|
(dolist (temporary-directory *temporary-directories-created*)
|
||||||
(recursive-delete temporary-directory)))
|
(recursive-delete temporary-directory)))
|
||||||
|
|
||||||
|
(define-constant +file-permissions+
|
||||||
|
'((:user-read . #.nix:s-irusr)
|
||||||
|
(:user-write . #.nix:s-iwusr)
|
||||||
|
(:user-exec . #.nix:s-ixusr)
|
||||||
|
(:group-read . #.nix:s-irgrp)
|
||||||
|
(:group-write . #.nix:s-iwgrp)
|
||||||
|
(:group-exec . #.nix:s-ixgrp)
|
||||||
|
(:other-read . #.nix:s-iroth)
|
||||||
|
(:other-write . #.nix:s-iwoth)
|
||||||
|
(:other-exec . #.nix:s-ixoth)
|
||||||
|
(:set-user-id . #.nix:s-isuid)
|
||||||
|
(:set-group-id . #.nix:s-isgid)
|
||||||
|
(:sticky . #.nix:s-isvtx))
|
||||||
|
:test #'equalp)
|
||||||
|
|
||||||
|
(defun file-permissions (file)
|
||||||
|
(labels ((extract-permissions (mode permissions-mask &optional (accum '()))
|
||||||
|
(if (> mode 0)
|
||||||
|
(let* ((permission (first permissions-mask))
|
||||||
|
(permission-name (car permission))
|
||||||
|
(permission-mask (cdr permission))
|
||||||
|
(mode-enabled (= (logand permission-mask mode)
|
||||||
|
1))
|
||||||
|
(modes (if mode-enabled
|
||||||
|
(push permission-name accum))))
|
||||||
|
(extract-permissions (logand permission-mask mode)
|
||||||
|
permissions-mask
|
||||||
|
modes))
|
||||||
|
accum)))
|
||||||
|
(let ((modes (nix:stat-mode (nix:stat file))))
|
||||||
|
(extract-permissions modes +file-permissions+))))
|
||||||
|
|
||||||
(defun has-file-permission-p (file permission)
|
(defun has-file-permission-p (file permission)
|
||||||
(find permission (osicat:file-permissions file) :test #'eq))
|
(find permission (file-permissions file) :test #'eq))
|
||||||
|
|
||||||
(defun file-can-write-p (file)
|
(defun file-can-write-p (file)
|
||||||
(has-file-permission-p file :user-write))
|
(has-file-permission-p file :user-write))
|
||||||
|
@ -480,8 +581,8 @@
|
||||||
:test #'eql))))
|
:test #'eql))))
|
||||||
|
|
||||||
(gen-permission-files
|
(gen-permission-files
|
||||||
nix:s-irwxu nix:s-irusr nix:s-iwusr nix:s-ixusr nix:s-irwxg nix:s-irgrp nix:s-iwgrp
|
nix:s-irusr nix:s-iwusr nix:s-ixusr nix:s-irgrp nix:s-iwgrp
|
||||||
nix:s-ixgrp nix:s-irwxo nix:s-iroth nix:s-iwoth nix:s-ixoth nix:s-isuid nix:s-isgid)
|
nix:s-ixgrp nix:s-iroth nix:s-iwoth nix:s-ixoth nix:s-isuid nix:s-isgid)
|
||||||
|
|
||||||
(defun set-file-permissions (file mode)
|
(defun set-file-permissions (file mode)
|
||||||
(nix:chmod file mode))
|
(nix:chmod file mode))
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
(uiop:launch-program cmd-line :output nil)))
|
(uiop:launch-program cmd-line :output nil)))
|
||||||
|
|
||||||
(defun getenv (name &key (default nil))
|
(defun getenv (name &key (default nil))
|
||||||
(or (nix:getenv name)
|
(or (uiop:getenv name)
|
||||||
default))
|
default))
|
||||||
|
|
||||||
(defun default-temp-dir ()
|
(defun default-temp-dir ()
|
||||||
|
@ -59,6 +59,35 @@
|
||||||
(defun pwd ()
|
(defun pwd ()
|
||||||
(getenv "PWD"))
|
(getenv "PWD"))
|
||||||
|
|
||||||
|
(defun home-directory (&key (add-separator-ends nil))
|
||||||
|
(let ((home (os-utils:getenv "HOME")))
|
||||||
|
(if add-separator-ends
|
||||||
|
(text-utils:strcat home fs:*directory-sep*)
|
||||||
|
home)))
|
||||||
|
|
||||||
|
(defstruct user-info
|
||||||
|
(name)
|
||||||
|
(password)
|
||||||
|
(user-id)
|
||||||
|
(group-id)
|
||||||
|
(gecos)
|
||||||
|
(home)
|
||||||
|
(shell))
|
||||||
|
|
||||||
|
(defun user-info (id)
|
||||||
|
"USER-INFO returns the password entry for the given name or
|
||||||
|
numerical user ID, as an assoc-list."
|
||||||
|
(a:when-let ((password-struct (etypecase id
|
||||||
|
(string (nix:getpwnam id))
|
||||||
|
(integer (nix:getpwuid id)))))
|
||||||
|
(make-user-info :name (nix:passwd-name password-struct)
|
||||||
|
:password (nix:passwd-passwd password-struct)
|
||||||
|
:user-id (nix:passwd-uid password-struct)
|
||||||
|
:group-id (nix:passwd-gid password-struct)
|
||||||
|
:gecos (nix:passwd-gecos password-struct)
|
||||||
|
:home (nix:passwd-dir password-struct)
|
||||||
|
:shell (nix:passwd-shell password-struct))))
|
||||||
|
|
||||||
(defun external-editor ()
|
(defun external-editor ()
|
||||||
(let* ((editor (or (swconf:external-editor)
|
(let* ((editor (or (swconf:external-editor)
|
||||||
(and (text-utils:string-not-empty-p (getenv "VISUAL"))
|
(and (text-utils:string-not-empty-p (getenv "VISUAL"))
|
||||||
|
|
|
@ -297,17 +297,15 @@
|
||||||
:cl
|
:cl
|
||||||
:alexandria)
|
:alexandria)
|
||||||
(:nicknames :fs)
|
(:nicknames :fs)
|
||||||
|
(:local-nicknames (:nix :sb-posix))
|
||||||
(:export
|
(:export
|
||||||
:+file-path-regex+
|
:+file-path-regex+
|
||||||
:+s-irwxu+
|
|
||||||
:+s-irusr+
|
:+s-irusr+
|
||||||
:+s-iwusr+
|
:+s-iwusr+
|
||||||
:+s-ixusr+
|
:+s-ixusr+
|
||||||
:+s-irwxg+
|
|
||||||
:+s-irgrp+
|
:+s-irgrp+
|
||||||
:+s-iwgrp+
|
:+s-iwgrp+
|
||||||
:+s-ixgrp+
|
:+s-ixgrp+
|
||||||
:+s-irwxo+
|
|
||||||
:+s-iroth+
|
:+s-iroth+
|
||||||
:+s-iwoth+
|
:+s-iwoth+
|
||||||
:+s-ixoth+
|
:+s-ixoth+
|
||||||
|
@ -316,12 +314,18 @@
|
||||||
:*directory-sep-regexp*
|
:*directory-sep-regexp*
|
||||||
:*directory-sep*
|
:*directory-sep*
|
||||||
:create-a-file
|
:create-a-file
|
||||||
|
:current-directory
|
||||||
|
:absolute-pathname
|
||||||
|
:read-link
|
||||||
:copy-a-file
|
:copy-a-file
|
||||||
:rename-a-file
|
:rename-a-file
|
||||||
:file-size
|
:file-size
|
||||||
:slurp-file
|
:slurp-file
|
||||||
:dump-sequence-to-file
|
:dump-sequence-to-file
|
||||||
:create-file
|
:create-file
|
||||||
|
:absolute-pathname-p
|
||||||
|
:relative-pathname-p
|
||||||
|
:file-kind
|
||||||
:cat-parent-dir
|
:cat-parent-dir
|
||||||
:has-extension
|
:has-extension
|
||||||
:get-extension
|
:get-extension
|
||||||
|
@ -358,7 +362,6 @@
|
||||||
:file-length-if-exists
|
:file-length-if-exists
|
||||||
:delete-file-if-exists
|
:delete-file-if-exists
|
||||||
:file-hash
|
:file-hash
|
||||||
:home-dir
|
|
||||||
:*temporary-files-created*
|
:*temporary-files-created*
|
||||||
:temporary-file
|
:temporary-file
|
||||||
:clean-temporary-files
|
:clean-temporary-files
|
||||||
|
@ -393,6 +396,8 @@
|
||||||
:cl
|
:cl
|
||||||
:config
|
:config
|
||||||
:constants)
|
:constants)
|
||||||
|
(:local-nicknames (:nix :sb-posix)
|
||||||
|
(:a :alexandria))
|
||||||
(:export
|
(:export
|
||||||
:+ssl-cert-name+
|
:+ssl-cert-name+
|
||||||
:+ssl-key-name+
|
:+ssl-key-name+
|
||||||
|
@ -401,6 +406,8 @@
|
||||||
:getenv
|
:getenv
|
||||||
:default-temp-dir
|
:default-temp-dir
|
||||||
:pwd
|
:pwd
|
||||||
|
:home-directory
|
||||||
|
:user-info
|
||||||
:run-external-program
|
:run-external-program
|
||||||
:process-exit-code
|
:process-exit-code
|
||||||
:process-exit-success-p
|
:process-exit-success-p
|
||||||
|
@ -421,7 +428,14 @@
|
||||||
:file->mime-type
|
:file->mime-type
|
||||||
:unzip-file
|
:unzip-file
|
||||||
:unzip-single-file
|
:unzip-single-file
|
||||||
:copy-to-clipboard))
|
:copy-to-clipboard
|
||||||
|
:user-info
|
||||||
|
:user-info-name
|
||||||
|
:user-info-user-id
|
||||||
|
:user-info-group-id
|
||||||
|
:user-info-gecos
|
||||||
|
:user-info-home
|
||||||
|
:user-info-shell))
|
||||||
|
|
||||||
(defpackage :text-utils
|
(defpackage :text-utils
|
||||||
(:use
|
(:use
|
||||||
|
@ -1609,8 +1623,7 @@
|
||||||
(defpackage :complete
|
(defpackage :complete
|
||||||
(:use
|
(:use
|
||||||
:cl
|
:cl
|
||||||
:alexandria
|
:alexandria)
|
||||||
:osicat)
|
|
||||||
(:export
|
(:export
|
||||||
:*complete-function*
|
:*complete-function*
|
||||||
:shortest-candidate
|
:shortest-candidate
|
||||||
|
|
|
@ -869,7 +869,8 @@
|
||||||
(let* ((signature-file (or (access:accesses *software-configuration*
|
(let* ((signature-file (or (access:accesses *software-configuration*
|
||||||
+key-signature-file+)
|
+key-signature-file+)
|
||||||
+default-signature-filename+))
|
+default-signature-filename+))
|
||||||
(signature-path (fs:cat-parent-dir (fs:home-dir) signature-file)))
|
(signature-path (fs:cat-parent-dir (os-utils:home-directory)
|
||||||
|
signature-file)))
|
||||||
(if (fs:file-exists-p signature-path)
|
(if (fs:file-exists-p signature-path)
|
||||||
signature-path
|
signature-path
|
||||||
nil)))
|
nil)))
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
:tooter
|
:tooter
|
||||||
:croatoan
|
:croatoan
|
||||||
:nodgui
|
:nodgui
|
||||||
:osicat
|
|
||||||
:flexi-streams
|
:flexi-streams
|
||||||
:cl-spark
|
:cl-spark
|
||||||
:access
|
:access
|
||||||
|
|
Loading…
Reference in New Issue