#include"adflib.h" int main() { struct List *list, *cell; /* initialization */ /* the device and volume are mounted */ cell = list = adfGetDelEnt(vol); while(cell) { block =(struct Block*) cell->content; printf("%s %d %d %ld\n",block->name,block->type,block->secType, block->sect); cell = cell->next; } /* we noted the entry 883 and 885 */ adfFreeDelList(list); /* 883 is a file */ if (adfCheckEntry(vol,883,0)==RC_OK) adfUndelEntry(vol,vol->curDirPtr,883); /* 885 is a directory */ if (adfCheckEntry(vol,885,0)==RC_OK) adfUndelEntry(vol,vol->curDirPtr,885); /* unmounts done */ /* cleanup */ }
adfGetDelEnt()
See adfFreeDelList() to free this list.
See adfCheckEntry() to check if the entry could be undeleted.
adfCheckEntry()
The 'level' argument is not used yet. Could be set to 0.
adfUndelEntry()
void adfFreeDelList(struct List* list)