Rebol 编程/delete-dir
外观
< Rebol 编程
DELETE-DIR dir
删除目录,包括所有文件和子目录。
DELETE-DIR 是一个函数值。
- dir -- (类型: 文件 URL)
delete-dir: func [ {Deletes a directory including all files and subdirectories.} dir [file! url!] /local files ][ if all [ dir? dir dir: dirize dir attempt [files: load dir] ] [ foreach file files [delete-dir dir/:file] ] attempt [delete dir] ]