C++ 文件或目录_findfirstc++;
我正在编写一个程序,它列出了特定目录中的所有文件和子目录,并返回该目录占用的大小。 为此,我使用函数findfirst64和findnext64 如何知道对象是文件还是目录? 关于找到的对象的信息在第二个参数中,C++ 文件或目录_findfirstc++;,c++,windows,file,directory,C++,Windows,File,Directory,我正在编写一个程序,它列出了特定目录中的所有文件和子目录,并返回该目录占用的大小。 为此,我使用函数findfirst64和findnext64 如何知道对象是文件还是目录? 关于找到的对象的信息在第二个参数中,struct\u finddata\u t _finddata_t_ info; intptr_t handle = _findfirst64("myfile", &info); if (handle > 0) { if (info->attrib &
struct\u finddata\u t
_finddata_t_ info;
intptr_t handle = _findfirst64("myfile", &info);
if (handle > 0)
{
if (info->attrib & _A_SUBDIR)
{
// it's a directory
关于找到的对象的信息在第二个参数中,struct\u finddata\u t
_finddata_t_ info;
intptr_t handle = _findfirst64("myfile", &info);
if (handle > 0)
{
if (info->attrib & _A_SUBDIR)
{
// it's a directory
这可能应该标记为“C”而不是“C++”。这可能应该标记为“C”而不是“C++”