Tim Peters wrote: > > Anyone know offhand if there's a reliable way to determine whether an open > file descriptor (a C FILE*) is seekable? I'd simply use trial&error: if (fseek(stream,0,SEEK_CUR) < 0) { if (errno != EBADF)) { /* Not seekable */ errno = 0; } else /* Error */ ; } else /* Seekable */ ; How to get this thread safe is left as exercise to the interested reader ;) Cheers, -- Marc-Andre Lemburg ______________________________________________________________________ Y2000: 166 days left Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4