System::IO::Directory::Delete 方法

Directory::Delete method

删除指定的文件或目录。不会抛出异常。

static void System::IO::Directory::Delete(const String &path, bool recursive=false)
参数类型描述
路径const String&要删除的目录或文件的路径
递归bool如果 path 指定的是非空目录,则 recursive 指定是否应递归删除目录的所有内容;如果 path 指定的目录非空且 recursive 为 ‘false’,则操作失败

另见