0

For an internal module we're writing an abstraction for handling streams. Thing is that the stream itself is actually parsed when instantiating the abstraction (thus file or url). At that point, I need to determine whether the stream supports seeking (like C# does).

Is there a possibility in PHP to determine whether the given stream (resource) supports seeking?

Last resort is to actually call the fseek() method and catch a possible error, but that results in side effects when handling a file stream.

Dygnus
  • 621
  • 6
  • 14

1 Answers1

1

stream_get_meta_data reports it in the seekable field.

Peter
  • 29,454
  • 5
  • 48
  • 60