# Some missing stream-wrapper functions

- Thread: https://externals.io/message/73673
- Original archive: https://news-web.php.net/php.internals/73673
- Started by Stefan Neufeind on 2014-04-11T22:29:51+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #73673 — Stefan Neufeind — 2014-04-11T22:29:51+00:00

URL: https://externals.io/message/73673#73673

Hi,

For unit-testing certain things we lately experimented with
stream-wrapper functions. Besides the basic functionality that has been
there for a while, since PHP 5.4 more functions are possible to
implement via stream_metadata.

But some very few functions like being able to "trap" symlink-calls
inside a stream-wrapper are still missing. Could somebody familiar with
that implementation maybe consider adding the missing functions so you
can "hook" into them with a custom stream-wrapper?

https://bugs.php.net/bug.php?id=38025

This has been quite a long-standing issue ...


Kind regards,
 Stefan

---

## #73679 — Stas Malyshev — 2014-04-13T09:51:53+00:00

URL: https://externals.io/message/73673#73679 · In reply to: #73673

Hi!

> But some very few functions like being able to "trap" symlink-calls
> inside a stream-wrapper are still missing. Could somebody familiar with
> that implementation maybe consider adding the missing functions so you
> can "hook" into them with a custom stream-wrapper?

Note that symlink is not available for many streams, as it makes sense
only on certain filesystems. So it is not very generic operation. But if
somebody proposes an RFC it can be done I guess. There are also `link()`,
 `readlink()`, etc. so it is not trivial.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
