Delete folders and files [just for collection]

xiaoxiao2021-03-06  54

BOOL DelTree (LPCTSTR lpszPath) {SHFILEOPSTRUCT FileOp; FileOp.fFlags = FOF_NOCONFIRMATION; FileOp.hNameMappings = NULL; FileOp.hwnd = NULL; FileOp.lpszProgressTitle = NULL; FileOp.pFrom = lpszPath; FileOp.pTo = NULL; FileOp.wFunc = FO_DELETE; RETURN SHFILEOPERATION (& Fileop) == 0;}

Code Description: LPSZPATH: The folder name to be deleted. Return Value: Successfully returns true, otherwise returns false. Note: Delete a single file can also be.

转载请注明原文地址:https://www.9cbs.com/read-114169.html

New Post(0)