mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-14 02:47:07 +03:00
5d4d8a053c
git-svn-id: svn://kolibrios.org@5804 a494cfbc-eb01-0410-851d-a64ba20cac60
32 lines
706 B
C
32 lines
706 B
C
BDVK file_info_count;
|
|
int file_count_copy;
|
|
|
|
void DirFileCount(dword way)
|
|
{
|
|
dword dirbuf, fcount, i, filename;
|
|
dword cur_file;
|
|
if (isdir(way))
|
|
{
|
|
cur_file = malloc(4096);
|
|
// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
|
|
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
|
|
for (i=0; i<fcount; i++)
|
|
{
|
|
filename = i*304+dirbuf+72;
|
|
sprintf(cur_file,"%s/%s",way,filename);
|
|
|
|
if (TestBit(ESDWORD[filename-40], 4) )
|
|
{
|
|
file_count_copy++;
|
|
DirFileCount(cur_file);
|
|
}
|
|
else
|
|
{
|
|
file_count_copy++;
|
|
}
|
|
}
|
|
free(cur_file);
|
|
}
|
|
}
|
|
|