5 #include "debugtools.h"
7 #include "shell32_main.h"
8 #include "winversion.h"
12 DEFAULT_DEBUG_CHANNEL(shell
);
14 /**************************************************************************
15 * SHELL_DeleteDirectoryA()
20 BOOL
SHELL_DeleteDirectoryA(LPCSTR pszDir
)
25 char szTemp
[MAX_PATH
];
27 strcpy(szTemp
, pszDir
);
28 PathAddBackslashA(szTemp
);
29 strcat(szTemp
, "*.*");
31 if(INVALID_HANDLE_VALUE
!= (hFind
= FindFirstFileA(szTemp
, &wfd
)))
35 if(strcasecmp(wfd
.cFileName
, ".") && strcasecmp(wfd
.cFileName
, ".."))
37 strcpy(szTemp
, pszDir
);
38 PathAddBackslashA(szTemp
);
39 strcat(szTemp
, wfd
.cFileName
);
41 if(FILE_ATTRIBUTE_DIRECTORY
& wfd
.dwFileAttributes
)
42 SHELL_DeleteDirectoryA(szTemp
);
46 } while(FindNextFileA(hFind
, &wfd
));
49 ret
= RemoveDirectoryA(pszDir
);
55 /*************************************************************************
56 * SHCreateDirectory [SHELL32.165]
60 * not sure about LPSECURITY_ATTRIBUTES
62 DWORD WINAPI
SHCreateDirectory(LPSECURITY_ATTRIBUTES sec
,LPCSTR path
)
65 TRACE("(%p,%s)\n",sec
,path
);
66 if ((ret
= CreateDirectoryA(path
,sec
)))
68 SHChangeNotifyA(SHCNE_MKDIR
, SHCNF_PATHA
, path
, NULL
);
73 /************************************************************************
74 * Win32DeleteFile [SHELL32.164]
76 * Deletes a file. Also triggers a change notify if one exists.
79 * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be
80 * ANSI. Is this Unicode on NT?
84 BOOL WINAPI
Win32DeleteFile(LPSTR fName
)
86 TRACE("%p(%s)\n", fName
, fName
);
89 SHChangeNotifyA(SHCNE_DELETE
, SHCNF_PATHA
, fName
, NULL
);
93 /*************************************************************************
94 * SHFileOperationA [SHELL32.243]
99 DWORD WINAPI
SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp
)
101 FIXME("(%p):stub.\n", lpFileOp
);
105 /*************************************************************************
106 * SHFileOperationW [SHELL32.244]
111 DWORD WINAPI
SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp
)
113 FIXME("(%p):stub.\n", lpFileOp
);
117 /*************************************************************************
118 * SHFileOperation [SHELL32.242]
121 DWORD WINAPI
SHFileOperationAW(LPVOID lpFileOp
)
123 if (VERSION_OsIsUnicode())
124 return SHFileOperationW(lpFileOp
);
125 return SHFileOperationA(lpFileOp
);