msdn里有个函数: DWORD GetFileAttributes( LPCTSTR lpFileName // pointer to the name of a file or directory );说是可以; 但如果在目录下创建一个文件test,而不是,调用 GetFileAttributes("test");dw = GetLastError();返回成功,既是说它分不清"test"是目录还是文件?
FindFirstFile The FindFirstFile function searches a directory for a file whose name matches the specified file name. FindFirstFile examines subdirectory names as well as file names.Mailto:[email protected]
DWORD GetFileAttributes(
LPCTSTR lpFileName // pointer to the name of a file or directory
);说是可以;
但如果在目录下创建一个文件test,而不是,调用
GetFileAttributes("test");dw = GetLastError();返回成功,既是说它分不清"test"是目录还是文件?
The FindFirstFile function searches a directory for a file whose name matches the specified file name. FindFirstFile examines subdirectory names as well as file names.Mailto:[email protected]