187,8 → 187,14 |
return 0; |
} |
|
:int GetDir(dword dir_buf, file_count, path) |
enum |
{ |
DIRS_ALL, |
DIRS_NOROOT, |
DIRS_ONLYREAL |
}; |
:int GetDir(dword dir_buf, file_count, path, doptions) |
{ |
dword buf, fcount, error; |
buf = malloc(32); |
error = ReadDir(0, buf, path); |
198,8 → 204,17 |
buf = realloc(buf, fcount+1*304+32); |
ReadDir(fcount, buf, path); |
//fcount=EBX; |
|
if (doptions == DIRS_ONLYREAL) |
{ |
if (!strcmp(".",buf+72)) {fcount--; memmov(buf,buf+304,fcount*304);} |
if (!strcmp("..",buf+72)) {fcount--; memmov(buf,buf+304,fcount*304);} |
} |
if (doptions == DIRS_NOROOT) |
{ |
if (!strcmp(".",buf+72)) {fcount--; memmov(buf,buf+304,fcount*304);} |
} |
|
ESDWORD[dir_buf] = buf; |
ESDWORD[file_count] = fcount; |
} |