如何刪除球拍中的非空目錄?刪除球拍編程語言中的非空目錄
當我調用這個API (刪除目錄DIR),其中dir是「/用戶/蘋果/庫/ Application Support/AOI」。有人告訴我:exn found:#(struct:exn:fail:filesystem:errno delete-directory:無法刪除目錄 path:/ Users/apple/Library/Application Support/aoi 系統錯誤:Directory not empty; errno = 66#(66。POSIX))
(define lib-folder '("/Users/apple/Library/Application Support/aoi"))
(define (del-lib-folder)
(for-each (λ (p)
(printf "del lib folder:~a~n" p)
(if (directory-exists? p)
(delete-directory p)
(printf "folder does not exist:~a~n" p)))
lib-folder))
我錯過了什麼?