I get your point, however if the resource is built elsewhere and given to an implementation of `StreamInterface` (e.g. `new BodyStream(fopen(...))`), then the resource can very well be closed from the outside as well, without the need for `detach()`.

And if the resource is built *inside* the implementation of `StreamInterface` (e.g. `new BodyStream('file.txt')`), then I would leave this implementation's destructor take care of closing the resource; so that it'll be automatically closed as soon as you've finished dealing with the stream, and the GC takes care of it.

So I would advocate getting rid of the `detach()` method, and creating a `StreamClosedException` that would be documented on all the methods of the `StreamInterface` as thrown when trying to access a stream based on an external resource that has been closed outside of the `StreamInterface` implementation.

Does this make sense?