I am stealing in C ++. Is there a way to find out if a directory contains a subdirectory?
It seems that CFileFind needs to be searched by shared files. It will take a long time if the only subdirectory is at the end of the list and there are many files.
for example: directory A contains 99995 files and one subdirectory at the end of the FindNextFile list. if I tried 99995 times, then Iβll say: yes, does it contain a subdirectory?
Raymond Chen of Microsoft wrote a post that is probably applicable here: Calculating the size of a directory is more than just adding file sizes . Essentially, he explains that information similar to the size of the directory cannot be stored in the dir entry, as different users may have different permissions, possibly making some of the files invisible to them. Therefore, the only way to get the size that the user should see is to calculate it on request from the user.
, , . , , , , , . Windows , , .
Win32 , , , .NET, . , .
.Net, Directory.GetDirectories 0. Do not , .
, , , , , .
boost.
directory_iterator [ boost/filesystem/operations.hpp] , , , (is_directory - , , ) ..
. .
, MFC [ , CFileFind], . , . , FindFirstFile/FindNextFile.
, .
Win32 FindFirstFile/FindNextFile , MFC CFileFind, , .
Source: https://habr.com/ru/post/1712533/More articles:Can I get instances of live objects of a certain type in C #? - winformsIs there a way to read the timecode trace of a Quicktime movie using applescript - applescriptmoving text while saving background image in CSS - htmlMoving a list of cards - listStruts2 configuration error message - struts2Hardcoded QMAKESPEC in Qt Creator? - installationHow is a stored image or video displayed in binary format on a hard drive? - binaryIPhone App Client Server - iphonejava & threads: thrown exceptions and the correct use of the BlockingQueue take () method - javaTransformation (rotation) of the image using the results of the matrix - development time and runtime - c #All Articles