MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rewinddir

Function rewinddir

components/dfs/dfs_v2/src/dfs_posix.c:1120–1128  ·  view source on GitHub ↗

* this function is a POSIX compliant version, which will reset directory * stream. * * @param d the directory stream. */

Source from the content-addressed store, hash-verified

1118 * @param d the directory stream.
1119 */
1120void rewinddir(DIR *d)
1121{
1122 if (d && d->fd > 0)
1123 {
1124 /* seek to the beginning of directory */
1125 if (dfs_file_lseek(fd_get(d->fd), 0, SEEK_SET) >= 0)
1126 d->num = d->cur = 0;
1127 }
1128}
1129RTM_EXPORT(rewinddir);
1130
1131/**

Callers

nothing calls this directly

Calls 2

dfs_file_lseekFunction · 0.70
fd_getFunction · 0.70

Tested by

no test coverage detected