这个算法如何设计
获取e盘下所有文件名, 所以才取递归.
递规的关键如何退出! 还有参数设计.
需要注意的是如何判断是文件还是文件夹?
如果是则递规进去, 不是打印接着遍历下个文件或文件夹
windows 如何判断是否是文件或文件夹
[解决办法]
FindFirstFile, FindFirstFileEx, FindNextFile function
typedef struct _WIN32_FIND_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; DWORD dwReserved0; DWORD dwReserved1; TCHAR cFileName[MAX_PATH]; TCHAR cAlternateFileName[14];
} WIN32_FIND_DATA, *PWIN32_FIND_DATA;
dwFileAttributes
File attributes of the file found.
This member can be one or more of the following values.
Attribute Meaning
FILE_ATTRIBUTE_ARCHIVE The file or directory is an archive file or directory.
Applications use this attribute to mark files for backup or removal.
查msdn