Closed slinga-homebrew closed 4 years ago
Ok, I will check that
USAGE:
jo_list filenames;
jo_list_init(&filenames);
jo_backup_read_device(dev, &filenames);
//Number of files : filenames.count
//Get filename : jo_list_at(&filenames, 0)->data.ch_arr or filenames.first->data.ch_arr
// You can also use jo_list_foreach
// Don't forger to free :)
jo_list_free_and_clear(&filenames);
Hi Johannes,
Thank you for implementing this functionality. I noticed that this code was not finding any saves. I traced the issue to:
JO_BACKUP_DRIVER_GET_FILE_INFO(backup_device, JO_NULL, JO_BACKUP_MAX_FILE, dir);
which should be:
JO_BACKUP_DRIVER_GET_FILE_INFO(backup_device, "", JO_BACKUP_MAX_FILE, dir);
Once I made that change my code starting working. I tried to make a PR but I hate GIT.
Hi Johannes,
For my newest project I am making use of Jo Engine's backup functions. I would like to request the addition of a wrapper to BUP_Dir() so I can list the saves on the backup medium.
BUP_Dir's prototype is: Sint32 BUP_Dir(Uint32 device,Uint8 fname,Uint16 dirsize, BupDir dir). On success the dir array is filled out a list of filenames on the save medium. Thanks in advance.