MCPcopy Create free account
hub / github.com/apache/singa / tinydir_readfile_n

Function tinydir_readfile_n

include/singa/utils/tinydir.h:374–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374_TINYDIR_FUNC
375int tinydir_readfile_n(const tinydir_dir *dir, tinydir_file *file, size_t i) {
376 if (dir == NULL || file == NULL) {
377 errno = EINVAL;
378 return -1;
379 }
380 if (i >= dir->n_files) {
381 errno = ENOENT;
382 return -1;
383 }
384
385 memcpy(file, &dir->_files[i], sizeof(tinydir_file));
386 _tinydir_get_ext(file);
387
388 return 0;
389}
390
391_TINYDIR_FUNC
392int tinydir_open_subdir_n(tinydir_dir *dir, size_t i) {

Callers

nothing calls this directly

Calls 1

_tinydir_get_extFunction · 0.85

Tested by

no test coverage detected