Files
TempleOS-Rijn/TempleOS/Demo/Dsk/OrderedIO.CPP
T
2018-09-08 21:45:52 +02:00

18 lines
424 B
C++

/*
$WW,1$This gets a lst of files, flattens the lst from a tree into an array and sorts them by cluster num, to speed-up access time by avoiding moving the disk head around.
$WW,0$*/
U0 Main()
{
I64 i,cnt=0;
CDirEntry *tempde=FilesFind("::/TempleOS/*",FUF_RECURSE),
**a=FilesOrder(tempde,&cnt);
for (i=0;i<cnt;i++) {
"%08X %s\n",a[i]->cluster,a[i]->full_name;
DirEntryDel(a[i]);
}
Free(a);
}
Main;