Raymond Toy pushed to branch issue-373-handle-temp-files at cmucl / cmucl
Commits:
-
19dec394
by Raymond Toy at 2025-11-13T07:25:30-08:00
1 changed file:
Changes:
| ... | ... | @@ -670,23 +670,6 @@ |
| 670 | 670 | (when (pathnamep ,filename)
|
| 671 | 671 | (delete-file ,filename))))))
|
| 672 | 672 | |
| 673 | -#+nil
|
|
| 674 | -(defun recursive-delete-directory (dir)
|
|
| 675 | - _N"Recursively delete the directory DIR. All files and subdirectories of
|
|
| 676 | - DIR are removed. DIR must be a pathname to a directory. Any NAME
|
|
| 677 | - or TYPE components in DIR are ignored."
|
|
| 678 | - (declare (type pathname dir))
|
|
| 679 | - ;; Find all the files or directories in DIR.
|
|
| 680 | - (dolist (path (directory (merge-pathnames "*.*" dir)))
|
|
| 681 | - ;; If the path is a directory, recursively delete the directory.
|
|
| 682 | - ;; Otherwise delete the file. We do not follow any symlinks.
|
|
| 683 | - (if (eq (unix:unix-file-kind (namestring path)) :directory)
|
|
| 684 | - (recursive-delete-directory path)
|
|
| 685 | - (delete-file path)))
|
|
| 686 | - ;; Finally delete the directory.
|
|
| 687 | - (unix:unix-rmdir (namestring dir))
|
|
| 688 | - (values))
|
|
| 689 | - |
|
| 690 | 673 | (defun delete-directory (dirname &key recursive)
|
| 691 | 674 | _N"Delete the directory Dirname. If the Recursive is non-NIL,
|
| 692 | 675 | recursively delete the directory Dirname including all files and
|